From 334c1c50dfa57da0b91687e097db295a6a3b699b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 17 Jul 2017 00:14:20 +0300 Subject: Add missing check in statuswindow.cpp --- src/gui/windows/statuswindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/windows/statuswindow.cpp') 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)"), -- cgit v1.2.3-70-g09d2