mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-01 03:36:26 -04:00
[string] Check for NULL
This commit is contained in:
parent
cd1193bf38
commit
87f18b53a0
@ -136,7 +136,9 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
|
|||||||
&document->cp_status,
|
&document->cp_status,
|
||||||
document->options.hard_assume);
|
document->options.hard_assume);
|
||||||
|
|
||||||
init_string(&html);
|
if (!init_string(&html)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
uristring = get_uri_string(document->uri, URI_PUBLIC);
|
uristring = get_uri_string(document->uri, URI_PUBLIC);
|
||||||
|
|
||||||
add_to_string(&html, "<html><head><meta charset=\"utf-8\"/><base href=\"");
|
add_to_string(&html, "<html><head><meta charset=\"utf-8\"/><base href=\"");
|
||||||
@ -169,7 +171,7 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
|
|||||||
} else {
|
} else {
|
||||||
struct string html_line;
|
struct string html_line;
|
||||||
|
|
||||||
init_string(&html_line);
|
if (init_string(&html_line)) {
|
||||||
convert_single_line(&html_line, &line);
|
convert_single_line(&html_line, &line);
|
||||||
|
|
||||||
if (html_line.length >= 4
|
if (html_line.length >= 4
|
||||||
@ -189,6 +191,7 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
|
|||||||
done_string(&html_line);
|
done_string(&html_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
begin = i + 1;
|
begin = i + 1;
|
||||||
if (!preformat) add_to_string(&html, "\n");
|
if (!preformat) add_to_string(&html, "\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user