Commit 2663f15c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix potential crash

parent b9a3e4ef
......@@ -137,11 +137,15 @@ Interface::BodyPartFormatter::Result MessageRfc822BodyPartFormatter::format(Inte
const ObjectTreeParser *otp = part->objectTreeParser();
const auto p = process(*part);
const auto mp = static_cast<MessagePart *>(p.data());
if (mp && !otp->attachmentStrategy()->inlineNestedMessages() && !otp->showOnlyOneMimePart()) {
return Failed;
if (mp) {
if (!otp->attachmentStrategy()->inlineNestedMessages() && !otp->showOnlyOneMimePart()) {
return Failed;
} else {
mp->html(true);
return Ok;
}
} else {
mp->html(true);
return Ok;
return Failed;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment