From de62d972dd4b8078eb3d4a14db7f1b62e19ae44e Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 7 Jul 2003 19:37:01 +0000 Subject: Fix crash. 2003-07-07 Christian Persch * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_find_bookmark): Fix crash. --- ChangeLog | 6 ++++++ src/bookmarks/ephy-bookmarks.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 877ef8567..2830a4a2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-07 Christian Persch + + * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_find_bookmark): + + Fix crash. + 2003-07-07 Christian Persch * src/ephy-tab.c: (build_progress_from_requests): 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; -- cgit v1.2.3