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:
parent
2da72b11c0
commit
cd1193bf38
@ -56,9 +56,10 @@ render_source_document_cxx(struct cache_entry *cached, struct document *document
|
||||
xmlpp::Document *docu = document->dom;
|
||||
xmlpp::ustring text = docu->write_to_string_formatted(get_cp_mime_name(document->cp));
|
||||
struct string tt;
|
||||
init_string(&tt);
|
||||
add_bytes_to_string(&tt, text.c_str(), text.size());
|
||||
render_plain_document(cached, document, &tt);
|
||||
done_string(&tt);
|
||||
if (init_string(&tt)) {
|
||||
add_bytes_to_string(&tt, text.c_str(), text.size());
|
||||
render_plain_document(cached, document, &tt);
|
||||
done_string(&tt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user