Fix nullptr check

This commit is contained in:
Tobias Fella
2023-07-23 23:11:47 +02:00
parent ef5d67e5bf
commit 5cce3bd692

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();