2009-12-09 [colin] 3.7.3cvs36
* src/compose.c Fix leak and unchecked accesses.
This commit is contained in:
parent
27646e8b7f
commit
ea8a1410e7
4 changed files with 19 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-12-09 [colin] 3.7.3cvs36
|
||||
|
||||
* src/compose.c
|
||||
Fix leak and unchecked accesses.
|
||||
|
||||
2009-12-09 [mir] 3.7.3cvs35
|
||||
|
||||
* src/compose.c
|
||||
|
|
|
@ -3909,3 +3909,4 @@
|
|||
( cvs diff -u -r 1.94.2.206 -r 1.94.2.207 src/messageview.c; ) > 3.7.3cvs33.patchset
|
||||
( cvs diff -u -r 1.382.2.531 -r 1.382.2.532 src/compose.c; ) > 3.7.3cvs34.patchset
|
||||
( cvs diff -u -r 1.382.2.532 -r 1.382.2.533 src/compose.c; ) > 3.7.3cvs35.patchset
|
||||
( cvs diff -u -r 1.382.2.533 -r 1.382.2.534 src/compose.c; ) > 3.7.3cvs36.patchset
|
||||
|
|
|
@ -12,7 +12,7 @@ MINOR_VERSION=7
|
|||
MICRO_VERSION=3
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=35
|
||||
EXTRA_VERSION=36
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -1178,20 +1178,24 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
|
|||
/* Place cursor according to provided input (mfield) */
|
||||
switch (mfield) {
|
||||
case NO_FIELD_PRESENT:
|
||||
gtk_widget_grab_focus(compose->header_last->entry);
|
||||
if (compose->header_last)
|
||||
gtk_widget_grab_focus(compose->header_last->entry);
|
||||
break;
|
||||
case TO_FIELD_PRESENT:
|
||||
buf = gtk_editable_get_chars(GTK_EDITABLE(compose->subject_entry), 0, -1);
|
||||
/*
|
||||
* buf will always contain an allocated string,
|
||||
* either empty or populated with some text
|
||||
*/
|
||||
gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), buf);
|
||||
if (buf) {
|
||||
gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), buf);
|
||||
g_free(buf);
|
||||
}
|
||||
gtk_widget_grab_focus(compose->subject_entry);
|
||||
break;
|
||||
case SUBJECT_FIELD_PRESENT:
|
||||
textview = GTK_TEXT_VIEW(compose->text);
|
||||
if (!textview)
|
||||
break;
|
||||
textbuf = gtk_text_view_get_buffer(textview);
|
||||
if (!textbuf)
|
||||
break;
|
||||
mark = gtk_text_buffer_get_insert(textbuf);
|
||||
gtk_text_buffer_get_iter_at_mark(textbuf, &iter, mark);
|
||||
gtk_text_buffer_insert(textbuf, &iter, "", -1);
|
||||
|
@ -8244,6 +8248,8 @@ static void compose_destroy(Compose *compose)
|
|||
slist_free_strings(compose->header_list);
|
||||
g_slist_free(compose->header_list);
|
||||
|
||||
compose->header_list = compose->newsgroup_list = compose->to_list = NULL;
|
||||
|
||||
g_hash_table_destroy(compose->email_hashtable);
|
||||
|
||||
procmsg_msginfo_free(compose->targetinfo);
|
||||
|
|
Loading…
Reference in a new issue