diff options
author | Shaun McCance <shaunm@gnome.org> | 2021-07-29 14:02:51 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2021-07-29 14:02:51 -0400 |
commit | 02bb34ef43035a9a6cd6e51ad139478fa7a50b1d (patch) | |
tree | 44ea2e12b549c92866e5f56ca53b6aa91de8d7a1 /libyelp/yelp-view.c | |
parent | 677e8f09c7af1859b8dcf0492da0fda6826bf9c6 (diff) | |
download | yelp-02bb34ef43035a9a6cd6e51ad139478fa7a50b1d.tar.gz |
Make search results go thru XSLT too
One step color to removing color computation and complex HTML
formatting from C.
Diffstat (limited to 'libyelp/yelp-view.c')
-rw-r--r-- | libyelp/yelp-view.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c index 1f10000c..9b2e5fb2 100644 --- a/libyelp/yelp-view.c +++ b/libyelp/yelp-view.c @@ -780,17 +780,19 @@ document_callback (YelpDocument *document, contents = yelp_document_read_contents (document, data->page_id); - content_length = strlen (contents); - - stream = g_memory_input_stream_new_from_data (g_strdup (contents), content_length, g_free); - yelp_document_finish_read (document, contents); - - webkit_uri_scheme_request_finish (data->request, - stream, - content_length, - mime_type); - g_free (mime_type); - g_object_unref (stream); + if (contents) { + content_length = strlen (contents); + + stream = g_memory_input_stream_new_from_data (g_strdup (contents), content_length, g_free); + yelp_document_finish_read (document, contents); + + webkit_uri_scheme_request_finish (data->request, + stream, + content_length, + mime_type); + g_free (mime_type); + g_object_unref (stream); + } } static void |