diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-08-31 20:52:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-08-31 20:52:24 +0300 |
commit | 70f79a3ffd4dd543772ab39a90a38fe2d1383643 (patch) | |
tree | 89a462cf6d2d185c5288f6f6e450fa2f7cf75041 /src | |
parent | 9796babbff903cecd727bc823e9aadd285598293 (diff) | |
download | plus-70f79a3ffd4dd543772ab39a90a38fe2d1383643.tar.gz plus-70f79a3ffd4dd543772ab39a90a38fe2d1383643.tar.bz2 plus-70f79a3ffd4dd543772ab39a90a38fe2d1383643.tar.xz plus-70f79a3ffd4dd543772ab39a90a38fe2d1383643.zip |
Fix code style.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/shortcutcontainer.h | 2 | ||||
-rw-r--r-- | src/resources/db/groupdb.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index 55e41c714..174918b42 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -47,7 +47,7 @@ class ShortcutContainer notfinal : public Widget, /** * Destructor. */ - ~ShortcutContainer() override; + virtual ~ShortcutContainer() override; /** * Invoked when a widget changes its size. This is used to determine 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; |