diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/room.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 7b60a77d..85eadd67 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -618,8 +618,9 @@ User* Room::user(const QString& userId) const JoinState Room::memberJoinState(User* user) const { - return d->membersMap.contains(user->name(this), user) ? JoinState::Join - : JoinState::Leave; + return user != nullptr && d->membersMap.contains(user->name(this), user) + ? JoinState::Join + : JoinState::Leave; } JoinState Room::joinState() const { return d->joinState; } |