[yelp/wip/amigadave/webkit2-port: 48/53] libyelp: fix runtime critical warning at startup when loading info document
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp/wip/amigadave/webkit2-port: 48/53] libyelp: fix runtime critical warning at startup when loading info document
- Date: Mon, 22 Jun 2015 14:01:19 +0000 (UTC)
commit dd6782b43481cdab9935cb762db9f32ef992df8c
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue Jun 16 10:01:52 2015 +0200
libyelp: fix runtime critical warning at startup when loading info document
YelpURI doesn't set a page_id when resolving info URIs, but YelpDocument
assumes it can't be NULL in document_request_page(). Simply check it's
not NULL before trying to use g_str_has_prefix().
libyelp/yelp-document.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index 0ee1219..c7c2f1f 100644
--- a/libyelp/yelp-document.c
+++ b/libyelp/yelp-document.c
@@ -857,7 +857,7 @@ document_request_page (YelpDocument *document,
g_mutex_lock (&document->priv->mutex);
- if (g_str_has_prefix (page_id, "search=")) {
+ if (page_id && g_str_has_prefix (page_id, "search=")) {
document->priv->reqs_search = g_slist_prepend (document->priv->reqs_search, request);
if (document->priv->indexed)
g_idle_add ((GSourceFunc) document_indexed, document);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]