diff options
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer-select-file.c | 15 |
2 files changed, 14 insertions, 6 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index c7c7f502f0..d2ffd22048 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2003-04-02 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer-select-file.c (e_msg_composer_select_file): Guard + against the filesel's selection being NULL. Fixes bug #40679. + 2003-04-01 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (composer_entry_focus_in_event_cb): Keep track diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c index 8698dd3d70..0ad89c220b 100644 --- a/composer/e-msg-composer-select-file.c +++ b/composer/e-msg-composer-select-file.c @@ -118,13 +118,16 @@ e_msg_composer_select_file_attachments (EMsgComposer *composer, gboolean *showin selection = run_selector(composer, _("Attach file(s)"), TRUE, showinline_p); if (selection) { - - list = g_ptr_array_new(); files = gtk_file_selection_get_selections(selection); - for (i=0;files[i];i++) - g_ptr_array_add(list, g_strdup(files[i])); - - g_strfreev(files); + + if (files != NULL) { + list = g_ptr_array_new (); + for (i = 0; files[i]; i++) + g_ptr_array_add (list, g_strdup (files[i])); + + g_strfreev (files); + } + gtk_widget_destroy((GtkWidget *)selection); } |