aboutsummaryrefslogtreecommitdiffstats
path: root/composer
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 /composer
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 'composer')
-rw-r--r--composer/ChangeLog11
-rw-r--r--composer/e-msg-composer-attachment-bar.c7
-rw-r--r--composer/e-msg-composer-attachment.c2
-rw-r--r--composer/e-msg-composer.c17
4 files changed, 33 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 284f2302a7..4710b653ab 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,14 @@
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #350539
+
+ * e-msg-composer-attachment.c: (e_msg_composer_attachment_edit):
+ * e-msg-composer-attachment-bar.c: (update), (attach_to_multipart):
+ * e-msg-composer.c: (add_attachments_handle_mime_part),
+ (handle_multipart_signed), (handle_multipart_alternative),
+ (handle_multipart):
+ Ensures non-NULL part.
+
2007-08-10 Johnny Jacob <jjohnny@novell.com>
* Modified and committed on behalf of Sankar P <psankar@novell.com>
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 83a4545608..efc4776dff 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -230,7 +230,7 @@ update (EMsgComposerAttachmentBar *bar)
attachment = p->data;
- if (!attachment->is_available_local) {
+ if (!attachment->is_available_local || !attachment->body) {
/* stock_attach would be better, but its fugly scaled up */
pixbuf = e_icon_factory_get_icon("stock_unknown", E_ICON_SIZE_DIALOG);
if (pixbuf) {
@@ -776,7 +776,10 @@ 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/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index 295c9a26ad..e986d5106f 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -588,7 +588,7 @@ e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment, GtkWidget *p
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",
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 0d569dcd9a..62db0ef7e7 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4175,7 +4175,10 @@ add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_pa
{
CamelContentType *content_type;
CamelDataWrapper *wrapper;
-
+
+ if (!mime_part)
+ return;
+
content_type = camel_mime_part_get_content_type (mime_part);
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
@@ -4262,6 +4265,10 @@ handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, int
e_msg_composer_set_pgp_sign (composer, TRUE);
mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
+
+ if (!mime_part)
+ return;
+
content_type = camel_mime_part_get_content_type (mime_part);
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
@@ -4374,6 +4381,10 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
CamelMimePart *mime_part;
mime_part = camel_multipart_get_part (multipart, i);
+
+ if (!mime_part)
+ continue;
+
content_type = camel_mime_part_get_content_type (mime_part);
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
@@ -4428,6 +4439,10 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
CamelMimePart *mime_part;
mime_part = camel_multipart_get_part (multipart, i);
+
+ if (!mime_part)
+ continue;
+
content_type = camel_mime_part_get_content_type (mime_part);
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));