diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-17 00:14:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-17 03:20:49 +0300 |
commit | 334c1c50dfa57da0b91687e097db295a6a3b699b (patch) | |
tree | 2b793efdabddb8c39cf2c7e4eaca1cfc205042ea /src | |
parent | 56a2df097e5e4979884395f341d4e1c8bfcf7ba8 (diff) | |
download | plus-334c1c50dfa57da0b91687e097db295a6a3b699b.tar.gz plus-334c1c50dfa57da0b91687e097db295a6a3b699b.tar.bz2 plus-334c1c50dfa57da0b91687e097db295a6a3b699b.tar.xz plus-334c1c50dfa57da0b91687e097db295a6a3b699b.zip |
Add missing check in statuswindow.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index e313cbc77..3dc7110b9 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -260,10 +260,12 @@ void StatusWindow::addTabBasic(const std::string &name) void StatusWindow::updateLevelLabel() { + if (!localPlayer) + return; + const int groupId = localPlayer->getGroupId(); const std::string &name = GroupDb::getName(groupId); - if (localPlayer != nullptr && - !name.empty()) + if (!name.empty()) { // TRANSLATORS: status window label mLvlLabel->setCaption(strprintf(_("Level: %d (%s %d)"), |