mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Workaround for segfaults introduced by previous commit.
Why html_context->part->document isn't set ?
This commit is contained in:
parent
b7409fc5a7
commit
a5c395cd7a
@ -146,7 +146,8 @@ html_button(struct html_context *html_context, unsigned char *a,
|
|||||||
unsigned char *al;
|
unsigned char *al;
|
||||||
struct form_control *fc;
|
struct form_control *fc;
|
||||||
enum form_type type = FC_SUBMIT;
|
enum form_type type = FC_SUBMIT;
|
||||||
int cp = html_context->part->document->cp;
|
int cp = (html_context->part && html_context->part->document) ?
|
||||||
|
html_context->part->document->cp : html_context->options->cp;
|
||||||
|
|
||||||
html_focusable(html_context, a);
|
html_focusable(html_context, a);
|
||||||
|
|
||||||
@ -266,7 +267,8 @@ html_input(struct html_context *html_context, unsigned char *a,
|
|||||||
{
|
{
|
||||||
unsigned char *al;
|
unsigned char *al;
|
||||||
struct form_control *fc;
|
struct form_control *fc;
|
||||||
int cp = html_context->part->document->cp;
|
int cp = (html_context->part && html_context->part->document) ?
|
||||||
|
html_context->part->document->cp : html_context->options->cp;
|
||||||
|
|
||||||
fc = init_form_control(FC_TEXT, a, html_context);
|
fc = init_form_control(FC_TEXT, a, html_context);
|
||||||
if (!fc) return;
|
if (!fc) return;
|
||||||
|
@ -215,7 +215,8 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
|||||||
unsigned char *usemap_attr;
|
unsigned char *usemap_attr;
|
||||||
struct document_options *options = html_context->options;
|
struct document_options *options = html_context->options;
|
||||||
int display_style = options->image_link.display_style;
|
int display_style = options->image_link.display_style;
|
||||||
int cp = html_context->part->document->cp;
|
int cp = (html_context->part && html_context->part->document) ?
|
||||||
|
html_context->part->document->cp : html_context->options->cp;
|
||||||
|
|
||||||
/* Note about display_style:
|
/* Note about display_style:
|
||||||
* 0 means always display IMG
|
* 0 means always display IMG
|
||||||
|
Loading…
Reference in New Issue
Block a user