diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | src/pdm-dialog.c | 12 |
2 files changed, 15 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2003-12-03 Christian Persch <chpe@cvs.gnome.org> + + * src/pdm-dialog.c: (pdm_cmd_delete_selection), (compare_cookies): + + Fix two crashers. + 2003-12-03 Piers Cornwell <piers@myrealbox.com> * src/pdm-dialog.c: (show_cookies_properties): diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index 4fa1066d0..df1002f23 100755 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -236,7 +236,13 @@ pdm_cmd_delete_selection (PdmActionInfo *action) selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(action->treeview)); llist = gtk_tree_selection_get_selected_rows (selection, &model); - + + if (llist == NULL) + { + /* nothing to delete, return early */ + return; + } + for (l = llist;l != NULL; l = l->next) { rlist = g_list_prepend (rlist, gtk_tree_row_reference_new @@ -446,8 +452,8 @@ compare_cookies (const EphyCookie *cookie1, g_return_val_if_fail (cookie1 != NULL || cookie2 != NULL, FALSE); return (strcmp (cookie1->domain, cookie2->domain) == 0 - && strcmp (cookie2->path, cookie2->path) == 0 - && strcmp (cookie2->name, cookie2->name) == 0); + && strcmp (cookie1->path, cookie2->path) == 0 + && strcmp (cookie1->name, cookie2->name) == 0); } static gboolean |