summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-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)