From 4cf650fb9876939f26ba6ddfb8e234928e7aa532 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 9 Mar 2025 17:36:08 -0700 Subject: [PATCH] fix team member remove bug --- src/ReceiveCommands.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 59d74f6b..b11520e3 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -5302,8 +5302,8 @@ static void on_EA_BB(shared_ptr c, uint16_t command, uint32_t flag, stri } catch (const out_of_range&) { } } - send_team_metadata_change_notifications( - s, team, removed_c->login->account->account_id, TeamMetadataChange::TEAM_MEMBER_COUNT); + uint32_t removed_account_id = (removed_c && removed_c->login) ? removed_c->login->account->account_id : 0; + send_team_metadata_change_notifications(s, team, removed_account_id, TeamMetadataChange::TEAM_MEMBER_COUNT); } else { // TODO: Figure out the right error code to use here. send_command(c, 0x06EA, 0x00000001);