From afd6e11236d3e63685e3bcd4588dee000c5222a3 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Fri, 27 Aug 2004 18:49:05 +0000 Subject: Don't crash if we're passed a NULL path. GtkFileChooser can return NULL 2004-08-27 Hans Petter Jansson * em-utils.c (emu_can_save): Don't crash if we're passed a NULL path. GtkFileChooser can return NULL filenames that get passed to this function. svn path=/trunk/; revision=27048 --- mail/ChangeLog | 6 ++++++ mail/em-utils.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 6ef0c850fd..fa4d235a62 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2004-08-27 Hans Petter Jansson + + * em-utils.c (emu_can_save): Don't crash if we're passed a NULL + path. GtkFileChooser can return NULL filenames that get passed + to this function. + 2004-08-26 Christian Neumair * GNOME_Evolution_Mail.server.in.in: diff --git a/mail/em-utils.c b/mail/em-utils.c index 6d7d4a2ba6..d50cbfc076 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -369,7 +369,7 @@ emu_can_save(GtkWindow *parent, const char *path) { struct stat st; - if (path[0] == 0) + if (!path || path[0] == 0) return FALSE; /* make sure we can actually save to it... */ -- cgit