diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/ChangeLog | 9 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 8 | ||||
-rw-r--r-- | widgets/misc/e-attachment.c | 2 |
3 files changed, 17 insertions, 2 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 710c6428fe..167ab2cbb7 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,12 @@ +2007-08-16 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #350539 + + * e-attachment.c: (e_attachment_edit): + * e-attachment-bar.c: (e_attachment_bar_create_attachment_cache), + (update), (attach_to_multipart): + Ensures non-NULL part. + 2007-08-06 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #429234 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)); diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 19503c5ea9..1019dab1c6 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -700,7 +700,7 @@ e_attachment_edit (EAttachment *attachment, GtkWidget *parent) dialog_data->mime_type_entry = GTK_ENTRY (glade_xml_get_widget (editor_gui, "mime_type_entry")); dialog_data->disposition_checkbox = GTK_TOGGLE_BUTTON (glade_xml_get_widget (editor_gui, "disposition_checkbox")); - if (attachment->is_available_local) { + if (attachment->is_available_local && attachment->body) { set_entry (editor_gui, "file_name_entry", camel_mime_part_get_filename (attachment->body)); set_entry (editor_gui, "description_entry", camel_mime_part_get_description (attachment->body)); content_type = camel_mime_part_get_content_type (attachment->body); |