aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-select-file.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-04-03 02:51:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-04-03 02:51:01 +0800
commit377bfb9b0c11470641e708c4803a18399822306a (patch)
treebc2336bd45b919ae7741ba170cdf3aa13a483b1b /composer/e-msg-composer-select-file.c
parentf00811036388bcd351175cedc7eeda618a99cbb2 (diff)
downloadgsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar
gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar.gz
gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar.bz2
gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar.lz
gsoc2013-evolution-377bfb9b0c11470641e708c4803a18399822306a.tar.xz
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
Diffstat (limited to 'composer/e-msg-composer-select-file.c')
-rw-r--r--composer/e-msg-composer-select-file.c15
1 files changed, 9 insertions, 6 deletions
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);
}