From 07f599e4b4e2ec6e9e9636d6efd8083a1217a97c Mon Sep 17 00:00:00 2001 From: James Willcox Date: Fri, 7 Feb 2003 23:53:10 +0000 Subject: Make the bookmarks editor not crash-on-close if no keyword is selected. 2003-02-07 James Willcox * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_dispose): Make the bookmarks editor not crash-on-close if no keyword is selected. --- src/bookmarks/ephy-bookmarks-editor.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/bookmarks') diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 22d6452a4..1a145188e 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -139,6 +139,13 @@ ephy_bookmarks_editor_dispose (GObject *object) if (editor->priv->key_view != NULL) { selection = ephy_node_view_get_selection (editor->priv->key_view); + if (selection == NULL || selection->data == NULL) + { + editor->priv->key_view = NULL; + G_OBJECT_CLASS (parent_class)->dispose (object); + return; + } + selected_id = ephy_node_get_id (EPHY_NODE (selection->data)); if (selected_id > 0) { -- cgit v1.2.3