1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[string] Check for NULL.

This commit is contained in:
Witold Filipczyk 2022-01-04 16:34:02 +01:00
parent 2da72b11c0
commit cd1193bf38

View File

@ -56,9 +56,10 @@ render_source_document_cxx(struct cache_entry *cached, struct document *document
xmlpp::Document *docu = document->dom; xmlpp::Document *docu = document->dom;
xmlpp::ustring text = docu->write_to_string_formatted(get_cp_mime_name(document->cp)); xmlpp::ustring text = docu->write_to_string_formatted(get_cp_mime_name(document->cp));
struct string tt; struct string tt;
init_string(&tt); if (init_string(&tt)) {
add_bytes_to_string(&tt, text.c_str(), text.size()); add_bytes_to_string(&tt, text.c_str(), text.size());
render_plain_document(cached, document, &tt); render_plain_document(cached, document, &tt);
done_string(&tt); done_string(&tt);
}
} }
} }