aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-08 03:37:01 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-08 03:37:01 +0800
commitde62d972dd4b8078eb3d4a14db7f1b62e19ae44e (patch)
tree6426b1758d4cc059c69483c14d131c7c1cbb0c2e /src/bookmarks/ephy-bookmarks.c
parentb90fc83ec72f99244a2d93c5c735a380cfe31d10 (diff)
downloadgsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.tar
gsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.tar.gz
gsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.tar.bz2
gsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.tar.lz
gsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.tar.xz
gsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.tar.zst
gsoc2013-epiphany-de62d972dd4b8078eb3d4a14db7f1b62e19ae44e.zip
Fix crash.
2003-07-07 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_find_bookmark): Fix crash.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r--src/bookmarks/ephy-bookmarks.c4
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;