* 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
This commit is contained in:
parent
239f8bb0a7
commit
7f0ae644cf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue