summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-21 01:06:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-21 01:06:13 +0300
commit529d5ac21229ba7678bba9832f69448898b159b9 (patch)
tree0481fb34b969e423681a520617fd02d7a4c5b8d5 /src/gui/windows
parentb10b9bbf68702e7c2b728d4036391399ae397eaa (diff)
downloadmanaplus-529d5ac21229ba7678bba9832f69448898b159b9.tar.gz
manaplus-529d5ac21229ba7678bba9832f69448898b159b9.tar.bz2
manaplus-529d5ac21229ba7678bba9832f69448898b159b9.tar.xz
manaplus-529d5ac21229ba7678bba9832f69448898b159b9.zip
Fix code style.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/shopwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 684f51a19..1b9d0a94a 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -819,6 +819,10 @@ void ShopWindow::sendMessage(const std::string &nick,
void ShopWindow::showList(const std::string &nick, std::string data)
{
+ const Inventory *const inv = PlayerInfo::getInventory();
+ if (!inv)
+ return;
+
BuyDialog *buyDialog = nullptr;
SellDialog *sellDialog = nullptr;
if (data.find("B1") == 0)
@@ -836,10 +840,6 @@ void ShopWindow::showList(const std::string &nick, std::string data)
return;
}
- const Inventory *const inv = PlayerInfo::getInventory();
- if (!inv)
- return;
-
if (buyDialog)
buyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
if (sellDialog)