nit: check makeIrcMessage return value

This commit is contained in:
Rasmus Karlsson 2024-10-20 11:09:16 +02:00
parent d3eacc5d8d
commit 802edeb8de
No known key found for this signature in database

View file

@ -512,13 +512,16 @@ std::vector<MessagePtr> parseUserNoticeMessage(Channel *channel,
auto [built, highlight] = MessageBuilder::makeIrcMessage( auto [built, highlight] = MessageBuilder::makeIrcMessage(
channel, message, args, content, 0); channel, message, args, content, 0);
built->flags.set(MessageFlag::Subscription); if (built)
built->flags.unset(MessageFlag::Highlighted);
if (mirrored)
{ {
built->flags.set(MessageFlag::SharedMessage); built->flags.set(MessageFlag::Subscription);
built->flags.unset(MessageFlag::Highlighted);
if (mirrored)
{
built->flags.set(MessageFlag::SharedMessage);
}
builtMessages.emplace_back(std::move(built));
} }
builtMessages.emplace_back(std::move(built));
} }
} }