Fixed spurious warning of 'player not found in activity in on_player_leave'

This commit is contained in:
Eric Froemling 2021-10-09 10:08:42 -05:00
parent 6ff2b30933
commit af68012d9d
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98

View File

@ -281,7 +281,7 @@ class Session:
assert isinstance(player, (Player, type(None)))
# Remove them from any current Activity.
if activity is not None:
if player is not None and activity is not None:
if player in activity.players:
activity.remove_player(sessionplayer)
else: