Commit c59f7ab4 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

MTP: fix crash when top-level node is generated by a formatter plugin

In such case the part is neither MessagePart, TextMessagePart or
AlternativeMessagePart, so all three pointers are null.
parent f5947ef8
......@@ -60,7 +60,7 @@ MessagePart::Ptr MimeTreeParser::toplevelTextNode(MessagePart::Ptr messageTree)
return text;
} else if (alternative) {
return alternative;
} else {
} else if (m) {
auto ret = toplevelTextNode(m);
if (ret) {
return ret;
......@@ -68,4 +68,4 @@ MessagePart::Ptr MimeTreeParser::toplevelTextNode(MessagePart::Ptr messageTree)
}
}
return MessagePart::Ptr();
}
\ No newline at end of file
}
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