1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00

[string] Check for NULL

This commit is contained in:
Witold Filipczyk 2022-01-04 16:40:28 +01:00
parent cd1193bf38
commit 87f18b53a0

View File

@ -136,7 +136,9 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
&document->cp_status,
document->options.hard_assume);
init_string(&html);
if (!init_string(&html)) {
return;
}
uristring = get_uri_string(document->uri, URI_PUBLIC);
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 {
struct string html_line;
init_string(&html_line);
if (init_string(&html_line)) {
convert_single_line(&html_line, &line);
if (html_line.length >= 4
@ -189,6 +191,7 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
done_string(&html_line);
}
}
}
begin = i + 1;
if (!preformat) add_to_string(&html, "\n");
}