2006-09-09 [wwp] 2.4.0cvs165
authorTristan Chabredier <wwp@claws-mail.org>
Sat, 9 Sep 2006 10:00:22 +0000 (10:00 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Sat, 9 Sep 2006 10:00:22 +0000 (10:00 +0000)
* src/prefs_filtering.c
fix a crash when opening filtering prefs, if matcherrc file contains
broken data (non-existing account id, which is theoretically not
possible).

ChangeLog
PATCHSETS
configure.ac
src/prefs_filtering.c

index 52db43b..b1429e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-09 [wwp]       2.4.0cvs165
+
+       * src/prefs_filtering.c
+               fix a crash when opening filtering prefs, if matcherrc file contains
+               broken data (non-existing account id, which is theoretically not
+               possible).
+
 2006-09-08 [colin]     2.4.0cvs164
 
        * src/folder.c
 2006-09-08 [colin]     2.4.0cvs164
 
        * src/folder.c
index 86c822e..45cd948 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.59.2.44 -r 1.59.2.45 src/prefs_filtering.c;  ) > 2.4.0cvs162.patchset
 ( cvs diff -u -r 1.43.2.44 -r 1.43.2.45 src/prefs_matcher.c;  ) > 2.4.0cvs163.patchset
 ( cvs diff -u -r 1.213.2.113 -r 1.213.2.114 src/folder.c;  cvs diff -u -r 1.1.4.28 -r 1.1.4.29 src/gtk/gtksctree.c;  ) > 2.4.0cvs164.patchset
 ( cvs diff -u -r 1.59.2.44 -r 1.59.2.45 src/prefs_filtering.c;  ) > 2.4.0cvs162.patchset
 ( cvs diff -u -r 1.43.2.44 -r 1.43.2.45 src/prefs_matcher.c;  ) > 2.4.0cvs163.patchset
 ( cvs diff -u -r 1.213.2.113 -r 1.213.2.114 src/folder.c;  cvs diff -u -r 1.1.4.28 -r 1.1.4.29 src/gtk/gtksctree.c;  ) > 2.4.0cvs164.patchset
+( cvs diff -u -r 1.59.2.45 -r 1.59.2.46 src/prefs_filtering.c;  ) > 2.4.0cvs165.patchset
index 385b913..b6ff8b4 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=164
+EXTRA_VERSION=165
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f1c7b0a..bfb78f7 100644 (file)
@@ -770,13 +770,16 @@ static void prefs_filtering_set_dialog(const gchar *header, const gchar *key)
 
        for(cur = prefs_filtering ; cur != NULL ; cur = g_slist_next(cur)) {
                FilteringProp * prop = (FilteringProp *) cur->data;
 
        for(cur = prefs_filtering ; cur != NULL ; cur = g_slist_next(cur)) {
                FilteringProp * prop = (FilteringProp *) cur->data;
-               gchar *account_name;
+               gchar *account_name = NULL;
 
                if (prop->account_id > 0) {
 
                if (prop->account_id > 0) {
-                       account_name = account_find_from_id(prop->account_id)->account_name;
-               } else {
-                       account_name = (gchar *)Q_("Filtering Account Menu|All");
+                       PrefsAccount *ac_prefs = account_find_from_id(prop->account_id);
+
+                       if (ac_prefs)
+                               account_name = ac_prefs->account_name;
                }
                }
+               if (account_name == NULL)
+                       account_name = (gchar *)Q_("Filtering Account Menu|All");
 
                cond_str = filteringprop_to_string(prop);
                subst_char(cond_str, '\t', ':');
 
                cond_str = filteringprop_to_string(prop);
                subst_char(cond_str, '\t', ':');