diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index d38bd6ed1..52dfe0cd4 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -870,6 +870,8 @@ ephy_bookmarks_find_bookmark (EphyBookmarks *eb, GPtrArray *children; int i; + g_return_val_if_fail (url != NULL, NULL); + children = ephy_node_get_children (eb->priv->bookmarks); for (i = 0; i < children->len; i++) { @@ -879,7 +881,7 @@ ephy_bookmarks_find_bookmark (EphyBookmarks *eb, kid = g_ptr_array_index (children, i); location = ephy_node_get_property_string (kid, EPHY_NODE_BMK_PROP_LOCATION); - if (strcmp (url, location) == 0) + if (location != NULL && strcmp (url, location) == 0) { ephy_node_thaw (eb->priv->bookmarks); return kid; |