mirror of https://github.com/djcb/mu.git
Merge pull request #632 from StAlphonsos/attila-bugfix-part-index
Fix core dump in mu-server (at least) for cmd:extract index:0 ...
This commit is contained in:
commit
3804c0d0c0
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue