aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-popup.c')
-rw-r--r--mail/em-popup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index f6f7372c40..bde562c939 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -435,7 +435,10 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
part = ((EAttachment *) ((EMPopupTargetAttachments *) t)->attachments->data)->body;
else
part = ((EMPopupTargetPart *) t)->part;
-
+
+ if (!part)
+ return;
+
filename = g_strdup(camel_mime_part_get_filename(part));
/* if filename is blank, create a default filename based on MIME type */