summaryrefslogtreecommitdiff
path: root/libre/xarchiver-libre/xarchiver-0.5.2-segfault-open-with.patch
blob: e29d40c4189b5b969b2cdaa0e1698e6ba324202c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff -pur xarchiver-0.5.2/src/open-with-dlg.c xarchiver-0.5.2.new/src/open-with-dlg.c
--- xarchiver-0.5.2/src/open-with-dlg.c	2008-10-17 14:06:03.000000000 +0200
+++ xarchiver-0.5.2.new/src/open-with-dlg.c	2011-05-16 21:48:49.042839556 +0200
@@ -289,7 +289,10 @@ static void xa_open_with_dialog_selectio
 	GtkTreeIter iter;
 	GtkTreeModel *model;
 
-	gtk_tree_selection_get_selected(selection,&model,&iter);
+	if (!gtk_tree_selection_get_selected(selection,&model,&iter)) {
+		return;
+	}
+
 	gtk_tree_model_get(model,&iter,2,&exec,-1);
 	
 	gtk_entry_set_text(GTK_ENTRY(data->custom_command_entry),exec);