From a5e45cef061b921981012176ad7dc9cb5e03dacc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 5 Jul 2011 22:33:12 +0300 Subject: Fix memory leak in shop window, add missing initialisation to BeingCacheEntry. Small code style fix. --- src/gui/shopwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/shopwindow.cpp') 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) -- cgit v1.2.3-70-g09d2