Fix core dump in mu-server (at least) for cmd:extract index:0 ...

This commit is contained in:
attila 2015-06-30 16:28:26 -05:00
parent 3df91c917d
commit f5a5cde965
1 changed files with 5 additions and 0 deletions

View File

@ -780,6 +780,11 @@ mu_msg_part_save (MuMsg *msg, MuMsgOptions opts,
part = (GMimeObject*)g_mime_message_part_get_message
(GMIME_MESSAGE_PART (part));
if (!part) {
g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_GMIME,
"part %u does not exist", partidx);
return FALSE;
}
if (!GMIME_IS_PART(part) && !GMIME_IS_MESSAGE(part)) {
g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_GMIME,
"unexpected type %s for part %u",