[balsa/gtk3] Check for NULL index



commit 803bfe7ba6cb420b087adc00c826c79847b73224
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Jun 7 12:46:44 2012 -0400

    Check for NULL index
    
    	* src/main-window.c: check for NULL index.

 ChangeLog         |    4 ++++
 src/main-window.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4bbd08c..3550235 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-06-07  Peter Bloomfield
 
+	* src/main-window.c: check for NULL index.
+
+2012-06-07  Peter Bloomfield
+
 	* src/balsa-index.c (bndx_find_root): check for NULL tree model.
 
 2012-06-07  Peter Bloomfield
diff --git a/src/main-window.c b/src/main-window.c
index 15e5998..5074bc8 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -4906,6 +4906,10 @@ bw_view_filter_idle(BalsaWindow * window)
     LibBalsaCondition *view_filter;
 
     index = (BalsaIndex *) window->current_index;
+
+    if (!index)
+        return FALSE;
+
     mailbox = index->mailbox_node->mailbox;
     view_filter = bw_get_flag_filter(window);
     libbalsa_mailbox_set_view_filter(mailbox, view_filter, FALSE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]