From 70f79a3ffd4dd543772ab39a90a38fe2d1383643 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 Aug 2018 20:52:24 +0300 Subject: Fix code style. --- src/resources/db/groupdb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/resources') diff --git a/src/resources/db/groupdb.cpp b/src/resources/db/groupdb.cpp index a8b75d39f..ea7ad0853 100644 --- a/src/resources/db/groupdb.cpp +++ b/src/resources/db/groupdb.cpp @@ -408,13 +408,14 @@ const GroupInfo *GroupDb::getGroup(const int id) bool GroupDb::isAllowCommand(const ServerCommandTypeT command) { + if (localPlayer == nullptr) + return false; const int groupId = localPlayer->getGroupId(); const GroupInfo *const group = GroupDb::getGroup(groupId); #ifdef TMWA_SUPPORT // allow any commands for legacy if group > 0 if (Net::getNetworkType() == ServerType::TMWATHENA && - localPlayer != nullptr && localPlayer->isGM()) { return true; -- cgit v1.2.3-70-g09d2