--- a/libpurple/protocols/msn/oim.c Mon Dec 15 02:22:01 2008 +0000 +++ b/libpurple/protocols/msn/oim.c Mon Dec 15 03:00:20 2008 +0000 @@ -630,13 +630,16 @@ msn_message_get_attr(message, "boundary")); tokens = g_strsplit(message->body, boundary, 0); - for (part = tokens; *part != NULL; part++) { + /* tokens+1 to skip the "This is a multipart message..." text */ + for (part = tokens+1; *part != NULL; part++) { MsnMessage *multipart; + const char *type; multipart = msn_message_new(MSN_MSG_UNKNOWN); msn_message_parse_payload(multipart, *part, strlen(*part), MSG_OIM_LINE_DEM, MSG_OIM_BODY_DEM); - if (!strcmp(msn_message_get_content_type(multipart), "text/plain")) { + type = msn_message_get_content_type(multipart); + if (type && !strcmp(type, "text/plain")) { decode_msg = (char *)purple_base64_decode(multipart->body, &body_len); msn_message_destroy(multipart); break;