balsa r7954 - in trunk: . libbalsa
- From: PeterB svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r7954 - in trunk: . libbalsa
- Date: Sun, 3 Aug 2008 17:24:49 +0000 (UTC)
Author: PeterB
Date: Sun Aug 3 17:24:49 2008
New Revision: 7954
URL: http://svn.gnome.org/viewvc/balsa?rev=7954&view=rev
Log:
handle NULL value from g_mime_message_part_get_message
Modified:
trunk/ChangeLog
trunk/libbalsa/body.c
Modified: trunk/libbalsa/body.c
==============================================================================
--- trunk/libbalsa/body.c (original)
+++ trunk/libbalsa/body.c Sun Aug 3 17:24:49 2008
@@ -182,16 +182,19 @@
message_part = GMIME_MESSAGE_PART(body->mime_part);
embedded_message = g_mime_message_part_get_message(message_part);
- libbalsa_message_headers_destroy(body->embhdrs);
- body->embhdrs =
- libbalsa_message_body_extract_embedded_headers(embedded_message);
- if (!*next_part)
- *next_part = libbalsa_message_body_new(body->message);
- libbalsa_message_body_set_mime_body(*next_part,
- embedded_message->mime_part);
- g_object_unref(embedded_message);
+ if (embedded_message) {
+ libbalsa_message_headers_destroy(body->embhdrs);
+ body->embhdrs =
+ libbalsa_message_body_extract_embedded_headers
+ (embedded_message);
+ if (!*next_part)
+ *next_part = libbalsa_message_body_new(body->message);
+ libbalsa_message_body_set_mime_body(*next_part,
+ embedded_message->mime_part);
+ g_object_unref(embedded_message);
+ }
- return &(*next_part)->next;
+ return *next_part ? &(*next_part)->next : next_part;
}
static LibBalsaMessageBody **
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]