fix segfault in prefs_matcher.c
authorMartin Schaaf <mascha@ma-scha.de>
Thu, 27 Feb 2003 20:43:39 +0000 (20:43 +0000)
committerMartin Schaaf <mascha@ma-scha.de>
Thu, 27 Feb 2003 20:43:39 +0000 (20:43 +0000)
ChangeLog.claws
configure.ac
src/prefs_matcher.c

index 729d5c1e5687edfaa65564525eaafa1ca4e4a62b..4a763ac996012e9a7f1a626570c09c1b8b0095a3 100644 (file)
@@ -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 
 2003-02-27 [martin]    0.8.10claws56
 
        * src/prefs_filtering.c 
index a7a4ad1063554baeec6354a9c1d12ebd39437afe..cf0eedd5afc29db3da4c523f5cecb8b3ee2bb336 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
 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
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 2ce214b223baf69e7a3e12e278e4022b355768e8..02d4cb9a5541c30e4a5b782264d6bd45b8dfc150 100644 (file)
@@ -1244,7 +1244,9 @@ static void prefs_matcher_delete_cb(void)
                return;
 
        gtk_clist_remove(clist, row);
                return;
 
        gtk_clist_remove(clist, row);
-       
+
+       prefs_matcher_reset_condition();
+
        prefs_matcher_update_hscrollbar();
 }
 
        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) break;
                                        row++;
                                }
+
                                if (strcmp(matcher_str, str) != 0) {
                                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);
                                                g_free(str);
-                                               return;
-                                       }
+                                               return;
+                                       }
                                }
                        }
                }
                                }
                        }
                }