From: Martin Schaaf Date: Thu, 27 Feb 2003 20:43:39 +0000 (+0000) Subject: fix segfault in prefs_matcher.c X-Git-Tag: rel_0_8_11~65 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=1fb97a2f3ca0f4a630b790b442ad055e4d0b1471 fix segfault in prefs_matcher.c --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 729d5c1e5..4a763ac99 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,11 @@ +2003-02-27 [martin] 0.8.10claws57 + + * src/prefs_matcher.c + fix segfault in prefs_matcher_ok() when the + last entry is deleted and prevents that the + message "entry not saved" comes up after deleting + an entry + 2003-02-27 [martin] 0.8.10claws56 * src/prefs_filtering.c diff --git a/configure.ac b/configure.ac index a7a4ad106..cf0eedd5a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=10 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws56 +EXTRA_VERSION=claws57 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c index 2ce214b22..02d4cb9a5 100644 --- a/src/prefs_matcher.c +++ b/src/prefs_matcher.c @@ -1244,7 +1244,9 @@ static void prefs_matcher_delete_cb(void) return; gtk_clist_remove(clist, row); - + + prefs_matcher_reset_condition(); + prefs_matcher_update_hscrollbar(); } @@ -1658,14 +1660,15 @@ static void prefs_matcher_ok(void) if (strcmp(matcher_str, str) == 0) break; row++; } + if (strcmp(matcher_str, str) != 0) { - val = alertpanel(_("Entry not saved"), - _("The entry was not saved\nHave you really finished?"), - _("Yes"), _("No"), NULL); - if (G_ALERTDEFAULT != val) { + val = alertpanel(_("Entry not saved"), + _("The entry was not saved\nHave you really finished?"), + _("Yes"), _("No"), NULL); + if (G_ALERTDEFAULT != val) { g_free(str); - return; - } + return; + } } } }