aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-03 21:05:31 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-03 21:05:31 +0800
commit34fa8474852c0efb0002dba6ad8daffbee1177d5 (patch)
treea7578c2e4624d496310237f03bab4d8bc3be3419 /src
parente4cb4e2580feaa94e913cd57e3bc572456124460 (diff)
downloadgsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.tar
gsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.tar.gz
gsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.tar.bz2
gsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.tar.lz
gsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.tar.xz
gsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.tar.zst
gsoc2013-epiphany-34fa8474852c0efb0002dba6ad8daffbee1177d5.zip
Fix two crashers.
2003-12-03 Christian Persch <chpe@cvs.gnome.org> * src/pdm-dialog.c: (pdm_cmd_delete_selection), (compare_cookies): Fix two crashers.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/pdm-dialog.c12
1 files changed, 9 insertions, 3 deletions
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