From d7f957ae02ed9dc6f89abb8a9b1f8f36e0777c86 Mon Sep 17 00:00:00 2001 From: Tristan Chabredier Date: Sat, 9 Sep 2006 10:00:22 +0000 Subject: [PATCH] 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). --- ChangeLog | 7 +++++++ PATCHSETS | 1 + configure.ac | 2 +- src/prefs_filtering.c | 11 +++++++---- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52db43b0b..b1429e56b 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index 86c822e2f..45cd94892 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1856,3 +1856,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index 385b913f4..b6ff8b49a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=4 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=164 +EXTRA_VERSION=165 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c index f1c7b0a97..bfb78f72d 100644 --- a/src/prefs_filtering.c +++ b/src/prefs_filtering.c @@ -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; - gchar *account_name; + gchar *account_name = NULL; 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', ':'); -- 2.25.1