2005-10-27 [colin] 1.9.15cvs124
authorColin Leroy <colin@colino.net>
Thu, 27 Oct 2005 16:23:04 +0000 (16:23 +0000)
committerColin Leroy <colin@colino.net>
Thu, 27 Oct 2005 16:23:04 +0000 (16:23 +0000)
* src/summaryview.c
Add a hack to avoid segfaulting when hammering
on gtk's events

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/summaryview.c

index c4dd653..c216c61 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-27 [colin]     1.9.15cvs124
+
+       * src/summaryview.c
+               Add a hack to avoid segfaulting when hammering 
+               on gtk's events
+
 2005-10-27 [wwp]       1.9.15cvs123
 
        * src/prefs_themes.c
index 1e11e3d..4509d33 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.143 -r 1.395.2.144 src/summaryview.c;  cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/gtk/gtksctree.c;  ) > 1.9.15cvs121.patchset
 ( cvs diff -u -r 1.213.2.67 -r 1.213.2.68 src/folder.c;  cvs diff -u -r 1.105.2.40 -r 1.105.2.41 src/prefs_account.c;  ) > 1.9.15cvs122.patchset
 ( cvs diff -u -r 1.3.2.31 -r 1.3.2.32 src/prefs_themes.c;  ) > 1.9.15cvs123.patchset
+( cvs diff -u -r 1.395.2.144 -r 1.395.2.145 src/summaryview.c;  ) > 1.9.15cvs124.patchset
index 17f930a..748f475 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=123
+EXTRA_VERSION=124
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8166f47..8094319 100644 (file)
@@ -1594,11 +1594,22 @@ void summary_select_node(SummaryView *summaryview, GtkCTreeNode *node,
 {
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
 
+       if (!summaryview->folder_item)
+               return;
        if (node) {
                gtkut_ctree_expand_parent_all(ctree, node);
                if (do_refresh) {
                        GTK_EVENTS_FLUSH();
                        gtk_widget_grab_focus(GTK_WIDGET(ctree));
+                       if (GTK_CTREE_ROW(node) == NULL) {
+                               g_warning("crash avoidance hack 1\n");
+                               return;
+                       }
+                       if (((GtkCListRow *)(GTK_CTREE_ROW(node)))->state < GTK_STATE_NORMAL
+                       ||  ((GtkCListRow *)(GTK_CTREE_ROW(node)))->state > GTK_STATE_INSENSITIVE) {
+                               g_warning("crash avoidance hack 2\n");
+                               return;
+                       }
                        gtk_ctree_node_moveto(ctree, node, -1, 0.5, 0);
                }
                summary_unselect_all(summaryview);