summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-05 22:33:12 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-05 22:33:12 +0300
commita5e45cef061b921981012176ad7dc9cb5e03dacc (patch)
tree80780eec88ab13b2a05269f70fc84bf3a67780ce /src/gui/shopwindow.cpp
parent710a37891458aaa3b924286950250500fb7b3fc3 (diff)
downloadmanaplus-a5e45cef061b921981012176ad7dc9cb5e03dacc.tar.gz
manaplus-a5e45cef061b921981012176ad7dc9cb5e03dacc.tar.bz2
manaplus-a5e45cef061b921981012176ad7dc9cb5e03dacc.tar.xz
manaplus-a5e45cef061b921981012176ad7dc9cb5e03dacc.zip
Fix memory leak in shop window, add missing initialisation to BeingCacheEntry.
Small code style fix.
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r--src/gui/shopwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index fdfea5d15..c6c41884d 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -190,12 +190,12 @@ void ShopWindow::action(const gcn::ActionEvent &event)
else if (event.getId() == "delete buy" && mBuyShopItemList
&& mBuyShopItemList->getSelected() >= 0)
{
- mBuyShopItems->erase(mBuyShopItemList->getSelected());
+ mBuyShopItems->del(mBuyShopItemList->getSelected());
}
else if (event.getId() == "delete sell" && mSellShopItemList
&& mSellShopItemList->getSelected() >= 0)
{
- mSellShopItems->erase(mSellShopItemList->getSelected());
+ mSellShopItems->del(mSellShopItemList->getSelected());
}
else if (event.getId() == "announce buy" && mBuyShopItems
&& mBuyShopItems->getNumberOfElements() > 0)