[evolution/kill-bonobo] Bug #540269 - Do not crash in em_format_is_attachment
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution/kill-bonobo] Bug #540269 - Do not crash in em_format_is_attachment
- Date: Tue, 2 Jun 2009 10:43:41 -0400 (EDT)
commit 4a904bb36ba977e4914cc29f9d1866b15f19e341
Author: Milan Crha <mcrha redhat com>
Date: Wed May 27 15:15:28 2009 +0200
Bug #540269 - Do not crash in em_format_is_attachment
Check if part contains data wrapper before accessing its members.
---
em-format/em-format.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 8f2046c..585b611 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1004,6 +1004,9 @@ gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
/*CamelContentType *ct = camel_mime_part_get_content_type(part);*/
CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
+ if (!dw)
+ return 0;
+
/*printf("checking is attachment %s/%s\n", ct->type, ct->subtype);*/
return !(camel_content_type_is (dw->mime_type, "multipart", "*")
|| camel_content_type_is(dw->mime_type, "application", "x-pkcs7-mime")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]