diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-04-03 02:51:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-04-03 02:51:01 +0800 |
commit | 377bfb9b0c11470641e708c4803a18399822306a (patch) | |
tree | bc2336bd45b919ae7741ba170cdf3aa13a483b1b | |
parent | f00811036388bcd351175cedc7eeda618a99cbb2 (diff) | |
download | gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar.gz gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar.zst gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.zip |
Guard against the filesel's selection being NULL. Fixes bug #40679.
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.
svn path=/trunk/; revision=20648
-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); } |