2011-11-17 [pawel] 3.7.10cvs86
authorPaweł Pękala <c0rn@gazeta.pl>
Thu, 17 Nov 2011 16:05:50 +0000 (16:05 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Thu, 17 Nov 2011 16:05:50 +0000 (16:05 +0000)
* src/mimeview.c
Fix crasher reported in bug #2543

ChangeLog
PATCHSETS
configure.ac
src/mimeview.c

index 0f80f87..d1588a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-17 [pawel]     3.7.10cvs86
+
+       * src/mimeview.c
+               Fix crasher reported in bug #2543
+
 2011-11-13 [colin]     3.7.10cvs85
 
        * src/compose.c
index a494449..13ddf12 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.335 -r 1.274.2.336 src/mainwindow.c;  cvs diff -u -r 1.83.2.179 -r 1.83.2.180 src/mimeview.c;  cvs diff -u -r 1.20.2.34 -r 1.20.2.35 src/mimeview.h;  cvs diff -u -r 1.395.2.437 -r 1.395.2.438 src/summaryview.c;  ) > 3.7.10cvs83.patchset
 ( cvs diff -u -r 1.654.2.4364 -r 1.654.2.4365 configure.ac;  ) > 3.7.10cvs84.patchset
 ( cvs diff -u -r 1.382.2.593 -r 1.382.2.594 src/compose.c;  ) > 3.7.10cvs85.patchset
+( cvs diff -u -r 1.83.2.180 -r 1.83.2.181 src/mimeview.c;  ) > 3.7.10cvs86.patchset
index 6c4fa35..f8c08da 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=85
+EXTRA_VERSION=86
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8d4dacb..9a19f3e 100644 (file)
@@ -574,12 +574,12 @@ MimeInfo *mimeview_get_selected_part(MimeView *mimeview)
        GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(mimeview->ctree));
        GtkTreeIter iter;
        GtkTreeSelection *selection;
-       MimeInfo *partinfo;
+       MimeInfo *partinfo = NULL;
        
        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(mimeview->ctree));
-       gtk_tree_selection_get_selected(selection, NULL, &iter);
-       
-       gtk_tree_model_get(model, &iter, COL_DATA, &partinfo, -1);
+       if (gtk_tree_selection_get_selected(selection, NULL, &iter))
+               gtk_tree_model_get(model, &iter, COL_DATA, &partinfo, -1);
+
        return partinfo;
 }