* src/addr_compl.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 20 Sep 2002 19:54:22 +0000 (19:54 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 20 Sep 2002 19:54:22 +0000 (19:54 +0000)
replace_address_in_edit(): strict check for NULL address to
fix "[ 607348 ] Segfault in address completion". My guess is
that this happens with an empty address book, but it's good
to have this check here anyway

completion_window_button_press(): free string returned
from the internal cache

ChangeLog.claws
configure.in
src/addr_compl.c

index c1df2b40232c7b06fece82bd52b18df12467cb04..ac6c64d76f716f6ff6a43b42fc48bbab575696d5 100644 (file)
@@ -1,3 +1,14 @@
+2002-09-20 [alfons]    0.8.2claws62
+
+       * src/addr_compl.c
+               replace_address_in_edit(): strict check for NULL address to
+               fix "[ 607348 ] Segfault in address completion". My guess is
+               that this happens with an empty address book, but it's good
+               to have this check here anyway
+               
+               completion_window_button_press(): free string returned 
+               from the internal cache
+
 2002-09-20 [christoph] 0.8.2claws61
 
        * src/procmime.h
index bc326b5db4ce923b405c403a585b878804cbf182..cb2ed631b06f73fa70fbc34d60c3e6602e267bcd 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws61
+EXTRA_VERSION=claws62
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index f6884235c8ea619e432b761cc5cc0b69add401af..1ee3a7dff9b2454cb70e390cb3bf7a517253293d 100644 (file)
@@ -288,6 +288,7 @@ gchar *get_address_from_edit(GtkEntry *entry, gint *start_pos)
 void replace_address_in_edit(GtkEntry *entry, const gchar *newtext,
                             gint start_pos)
 {
+       if (!newtext) return;
        gtk_editable_delete_text(GTK_EDITABLE(entry), start_pos, -1);
        gtk_editable_insert_text(GTK_EDITABLE(entry), newtext, strlen(newtext),
                                 &start_pos);
@@ -869,6 +870,7 @@ static gboolean completion_window_button_press(GtkWidget *widget,
                prefix = get_complete_address(0);
                g_free(get_address_from_edit(GTK_ENTRY(entry), &cursor_pos));
                replace_address_in_edit(GTK_ENTRY(entry), prefix, cursor_pos);
+               g_free(prefix);
        }
 
        clear_completion_cache();