diff --git a/server/gameserver/custom_battle.cc b/server/gameserver/custom_battle.cc index 205ac1f9..f5be5a55 100644 --- a/server/gameserver/custom_battle.cc +++ b/server/gameserver/custom_battle.cc @@ -81,6 +81,12 @@ void CustomBattle::ParseResult(a8::XObject& obj) bool CustomBattle::CanAdd(const std::string& account_id, const std::string& session_id) { auto member = GetMemberByAccountId(account_id); + if (!member) { + return false; + } + if (member->IsJoined()) { + return false; + } return true; }