aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment-bar.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-08-16 18:51:06 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-08-16 18:51:06 +0800
commitca5d6d6a338fbe5d8e6b24b85f681b9df07ce392 (patch)
tree45fb3d086d27a695be5eff6ae9f7a8d47d23fd7b /widgets/misc/e-attachment-bar.c
parent6ee27498e11e532a971cbb10659d754a7c2a577d (diff)
downloadgsoc2013-evolution-ca5d6d6a338fbe5d8e6b24b85f681b9df07ce392.tar.gz
gsoc2013-evolution-ca5d6d6a338fbe5d8e6b24b85f681b9df07ce392.tar.zst
gsoc2013-evolution-ca5d6d6a338fbe5d8e6b24b85f681b9df07ce392.zip
2007-08-16 mcrha Part of fix for bug #350539
svn path=/trunk/; revision=34017
Diffstat (limited to 'widgets/misc/e-attachment-bar.c')
-rw-r--r--widgets/misc/e-attachment-bar.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index ce1268ce1c..f733d4dbad 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -194,6 +194,9 @@ e_attachment_bar_create_attachment_cache (EAttachment *attachment)
CamelContentType *content_type;
+ if (!attachment->body)
+ return;
+
content_type = camel_mime_part_get_content_type (attachment->body);
if (camel_content_type_is(content_type, "image", "*")) {
@@ -277,7 +280,7 @@ update (EAttachmentBar *bar)
attachment = priv->attachments->pdata[i];
- if (!attachment->is_available_local) {
+ if (!attachment->is_available_local || !attachment->body) {
/* stock_attach would be better, but its fugly scaled up */
if ((pixbuf = e_icon_factory_get_icon("stock_unknown", E_ICON_SIZE_DIALOG))) {
attachment->index = gnome_icon_list_append_pixbuf (icon_list, pixbuf, NULL, "");
@@ -1070,6 +1073,9 @@ attach_to_multipart (CamelMultipart *multipart,
CamelContentType *content_type;
CamelDataWrapper *content;
+ if (!attachment->body)
+ return;
+
content_type = camel_mime_part_get_content_type (attachment->body);
content = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));