Fix nullptr check

This commit is contained in:
Tobias Fella
2023-07-23 23:10:52 +02:00
parent b486cb905c
commit 00b7f68a03

View File

@@ -993,7 +993,7 @@ void NeoChatRoom::deleteMessagesByUser(const QString &user, const QString &reaso
QString NeoChatRoom::joinRule() const QString NeoChatRoom::joinRule() const
{ {
auto joinRulesEvent = currentState().get<JoinRulesEvent>(); auto joinRulesEvent = currentState().get<JoinRulesEvent>();
if (joinRulesEvent) { if (!joinRulesEvent) {
return {}; return {};
} }
return joinRulesEvent->joinRule(); return joinRulesEvent->joinRule();