summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-17 00:14:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-17 03:20:49 +0300
commit334c1c50dfa57da0b91687e097db295a6a3b699b (patch)
tree2b793efdabddb8c39cf2c7e4eaca1cfc205042ea /src/gui
parent56a2df097e5e4979884395f341d4e1c8bfcf7ba8 (diff)
downloadmv-334c1c50dfa57da0b91687e097db295a6a3b699b.tar.gz
mv-334c1c50dfa57da0b91687e097db295a6a3b699b.tar.bz2
mv-334c1c50dfa57da0b91687e097db295a6a3b699b.tar.xz
mv-334c1c50dfa57da0b91687e097db295a6a3b699b.zip
Add missing check in statuswindow.cpp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/statuswindow.cpp6
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)"),