summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-10 22:23:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-10 22:23:45 +0300
commitfca0f15e161755e0a430802b1b38bdda0cb033cb (patch)
treec81055dd71fa7a6510d029da65d7f0a36078a99a /src/gui/windows
parenteaf9448af11e82a567a82aafba95f65e984d9942 (diff)
downloadmanaplus-fca0f15e161755e0a430802b1b38bdda0cb033cb.tar.gz
manaplus-fca0f15e161755e0a430802b1b38bdda0cb033cb.tar.bz2
manaplus-fca0f15e161755e0a430802b1b38bdda0cb033cb.tar.xz
manaplus-fca0f15e161755e0a430802b1b38bdda0cb033cb.zip
Fix crash on closing sell dialog in some cases.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/npcselldialog.cpp3
1 files changed, 1 insertions, 2 deletions
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);