From fca0f15e161755e0a430802b1b38bdda0cb033cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 10 May 2015 22:23:45 +0300 Subject: Fix crash on closing sell dialog in some cases. --- src/gui/windows/npcselldialog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/windows/npcselldialog.cpp') diff --git a/src/gui/windows/npcselldialog.cpp b/src/gui/windows/npcselldialog.cpp index 881e15254..683593deb 100644 --- a/src/gui/windows/npcselldialog.cpp +++ b/src/gui/windows/npcselldialog.cpp @@ -101,8 +101,7 @@ void NpcSellDialog::sellAction(const ActionEvent &event) { // All were sold mShopItemList->setSelected(-1); - delete mShopItems->at(selectedItem); - mShopItems->erase(selectedItem); + mShopItems->del(selectedItem); Rect scroll; scroll.y = mShopItemList->getRowHeight() * (selectedItem + 1); -- cgit v1.2.3-70-g09d2