From a923f76715c4cca404b318f5370b8098b4b0a83f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 20 Feb 2003 16:24:41 +0000 Subject: Dont crash when dragging a new bookmark on the toolbar and then click 2003-02-20 Marco Pesenti Gritti * lib/widgets/ephy-editable-toolbar.c: (drag_data_received_cb): * src/toolbar.c: (toolbar_get_action): Dont crash when dragging a new bookmark on the toolbar and then click cancel. --- src/toolbar.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/toolbar.c b/src/toolbar.c index 1872a86eb..5929d718a 100755 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -172,9 +172,14 @@ toolbar_get_action (EphyEditableToolbar *etoolbar, gtk_widget_destroy (new_bookmark); } - g_return_val_if_fail (id != 0, NULL); - - action = get_bookmark_action (t, bookmarks, id); + if (id != 0) + { + action = get_bookmark_action (t, bookmarks, id); + } + else + { + action = NULL; + } g_list_foreach (uris, (GFunc)g_free, NULL); g_list_free (uris); -- cgit