aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-cal-popup.c5
-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
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-format-html.c11
-rw-r--r--mail/em-format-quote.c8
-rw-r--r--mail/em-format.c11
-rw-r--r--mail/em-popup.c5
-rw-r--r--plugins/audio-inline/ChangeLog7
-rw-r--r--plugins/audio-inline/audio-inline.c6
-rw-r--r--plugins/mail-to-task/ChangeLog7
-rw-r--r--plugins/mail-to-task/mail-to-task.c3
-rw-r--r--plugins/prefer-plain/ChangeLog7
-rw-r--r--plugins/prefer-plain/prefer-plain.c2
-rw-r--r--widgets/misc/ChangeLog9
-rw-r--r--widgets/misc/e-attachment-bar.c8
-rw-r--r--widgets/misc/e-attachment.c2
20 files changed, 133 insertions, 13 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 68bc8a4c4d..889c9250f7 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
2007-08-16 Milan Crha <mcrha@redhat.com>
+ ** Part of fix for bug #350539
+
+ * gui/e-cal-popup.c: (ecalp_part_popup_set_background):
+ Ensures non-NULL part.
+
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #464106
* gui/goto.c: (goto_dialog):
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index a5e4a0ed4a..f6ce2efe5f 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -210,7 +210,10 @@ ecalp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
CamelMimePart *part = NULL;
part = ((EAttachment *) ((ECalPopupTargetAttachments *) t)->attachments->data)->body;
-
+
+ if (!part)
+ return;
+
filename = g_strdup(camel_mime_part_get_filename(part));
/* if filename is blank, create a default filename based on MIME type */
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));
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ffdd76426a..19e5e6de00 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #350539
+
+ * em-format-quote.c: (emfq_format_headers), (emfq_text_plain):
+ * em-format.c: (emf_multipart_alternative), (emf_inlinepgp_signed):
+ * em-popup.c: (emp_part_popup_set_background):
+ * em-format-html.c: (efh_text_plain), (efh_message_external),
+ (efh_format_headers):
+ Ensures non-NULL part.
+
2007-08-16 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #467198
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 2fbe9932c2..3ff8358853 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -775,6 +775,9 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
for (i=0;i<count;i++) {
CamelMimePart *newpart = camel_multipart_get_part(mp, i);
+ if (!newpart)
+ continue;
+
type = camel_mime_part_get_content_type(newpart);
if (camel_content_type_is (type, "text", "*") && !camel_content_type_is(type, "text", "calendar")) {
camel_stream_printf (stream,
@@ -899,6 +902,11 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
const char *access_type;
char *url = NULL, *desc = NULL;
+ if (!part) {
+ camel_stream_printf(stream, _("Unknown external-body part."));
+ return;
+ }
+
/* needs to be cleaner */
type = camel_mime_part_get_content_type(part);
access_type = camel_content_type_param (type, "access-type");
@@ -1779,6 +1787,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
char *header_sender = NULL, *header_from = NULL, *name;
gboolean mail_from_delegate = FALSE;
+ if (!part)
+ return;
+
ct = camel_mime_part_get_content_type((CamelMimePart *)part);
charset = camel_content_type_param (ct, "charset");
charset = e_iconv_charset_name(charset);
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index 647a7783a5..1b17e004aa 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -358,6 +358,9 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part
const char *charset;
EMFormatHeader *h;
+ if (!part)
+ return;
+
ct = camel_mime_part_get_content_type ((CamelMimePart *) part);
charset = camel_content_type_param (ct, "charset");
charset = e_iconv_charset_name (charset);
@@ -457,7 +460,10 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
CamelContentType *type;
const char *format;
guint32 rgb = 0x737373, flags;
-
+
+ if (!part)
+ return;
+
flags = emfq->text_html_flags;
/* Check for RFC 2646 flowed text. */
diff --git a/mail/em-format.c b/mail/em-format.c
index 40e2661706..7584f3301f 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -1243,6 +1243,10 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par
/* is it correct to use the passed in *part here? */
part = camel_multipart_get_part(mp, i);
+
+ if (!part)
+ continue;
+
type = camel_mime_part_get_content_type (part);
mime_type = camel_content_type_simple (type);
@@ -1533,7 +1537,12 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E
CamelStream *ostream;
CamelException *ex;
char *type;
-
+
+ if (!ipart) {
+ em_format_format_error(emf, stream, _("Unknown error verifying signature"));
+ return;
+ }
+
ex = camel_exception_new();
cipher = camel_gpg_context_new(emf->session);
/* Verify the signature of the message */
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 */
diff --git a/plugins/audio-inline/ChangeLog b/plugins/audio-inline/ChangeLog
index 98a3dbbc8f..9236ac4af8 100644
--- a/plugins/audio-inline/ChangeLog
+++ b/plugins/audio-inline/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #350539
+
+ * audio-inline.c: (org_gnome_audio_inline_play_clicked):
+ Ensures non-NULL part.
+
2006-01-09 Kjartan Maraas <kmaraas@gnome.org>
* audio-inline.c: (org_gnome_audio_inline_add_button):
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index dd9621ce6b..615e06446c 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -214,14 +214,16 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob
d(printf ("audio inline formatter: init gst thread\n"));
if (gst_init_check (&argc, (char ***) &argv)) {
- CamelContentType *type;
+ CamelContentType *type = NULL;
GstElement *filesrc;
/* create a disk reader */
filesrc = gst_element_factory_make ("filesrc", "disk_source");
g_object_set (G_OBJECT (filesrc), "location", po->filename, NULL);
- type = camel_mime_part_get_content_type (po->part);
+ if (po->part)
+ type = camel_mime_part_get_content_type (po->part);
+
if (type) {
if (!g_ascii_strcasecmp (type->type, "audio")) {
if (!g_ascii_strcasecmp (type->subtype, "mpeg") || !g_ascii_strcasecmp (type->subtype, "x-mpeg")
diff --git a/plugins/mail-to-task/ChangeLog b/plugins/mail-to-task/ChangeLog
index 35727aa4b1..c811d9dc7e 100644
--- a/plugins/mail-to-task/ChangeLog
+++ b/plugins/mail-to-task/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #350539
+
+ * mail-to-task.c: (set_description):
+ Ensures non-NULL mime_part.
+
2007-04-02 Sankar P <psankar@novell.com>
* Committed on behalf of Gilles Dartiguelongue <dartigug@esiee.fr>
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 9b3d18e7fd..0cddb62bf2 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -131,6 +131,9 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
count--;
}
+ if (!mime_part)
+ return;
+
type = camel_mime_part_get_content_type (mime_part);
if (!camel_content_type_is (type, "text", "plain"))
return;
diff --git a/plugins/prefer-plain/ChangeLog b/plugins/prefer-plain/ChangeLog
index da61ef43d7..3c16d88af2 100644
--- a/plugins/prefer-plain/ChangeLog
+++ b/plugins/prefer-plain/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #350539
+
+ * prefer-plain.c: (org_gnome_prefer_plain_multipart_alternative):
+ Ensures non-NULL part.
+
2007-08-05 Johnny Jacob <jjohnny@novell.com>
* Committed on behalf of Anand V M <avmuttagi@gmail.com>
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index 515645bbad..7d967db839 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -66,7 +66,7 @@ org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t)
nparts = camel_multipart_get_number(mp);
for (i=0; i<nparts; i++) {
part = camel_multipart_get_part(mp, i);
- if (camel_content_type_is(camel_mime_part_get_content_type(part), "text", "plain")) {
+ if (part && camel_content_type_is(camel_mime_part_get_content_type(part), "text", "plain")) {
displayid = i;
display_part = part;
break;
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);