From: Sergio Villar SenĂ­n Date: Thu, 21 Jan 2010 15:50:18 +0000 (+0100) Subject: Fixes a crash when saving attachments fails X-Git-Tag: 3.2.11~4 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=537dbe16313dc2a78d83d772d5d81bcbd0432722;ds=inline Fixes a crash when saving attachments fails Fixes NB#153599 --- diff --git a/src/hildon2/modest-msg-view-window.c b/src/hildon2/modest-msg-view-window.c index 9749443..0c48c82 100644 --- a/src/hildon2/modest-msg-view-window.c +++ b/src/hildon2/modest-msg-view-window.c @@ -3220,7 +3220,7 @@ save_mime_part_to_file (SaveMimePartInfo *info) if (written < 0) { g_warning ("modest: could not save attachment %s: %d (%s)\n", pair->filename, error?error->code:-1, error?error->message:"Unknown error"); - if ((error->domain == TNY_ERROR_DOMAIN) && + if (error && (error->domain == TNY_ERROR_DOMAIN) && (error->code == TNY_IO_ERROR_WRITE) && (errno == ENOSPC)) { info->result = GNOME_VFS_ERROR_NO_SPACE;