summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-05-23 05:53:31 -0400
committerChuck Miller <shadowmil@gmail.com>2009-05-23 05:53:31 -0400
commit1407a08f0087905edae30ac3793e83757ff56d4c (patch)
treee9825de51a072bca6b71cdb5ec0c4cf713c87eb7
parent8766348bdc55e6aea795cbb765fadea08a70476c (diff)
downloadmana-1407a08f0087905edae30ac3793e83757ff56d4c.tar.gz
mana-1407a08f0087905edae30ac3793e83757ff56d4c.tar.bz2
mana-1407a08f0087905edae30ac3793e83757ff56d4c.tar.xz
mana-1407a08f0087905edae30ac3793e83757ff56d4c.zip
Fixes a segmentfault and disables shift split for eA
-rw-r--r--src/gui/inventorywindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index d6cd3a84..47f66e76 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -233,11 +233,12 @@ void InventoryWindow::keyReleased(gcn::KeyEvent &event)
void InventoryWindow::valueChanged(const gcn::SelectionEvent &event)
{
- if (mSplit)
+ if (mSplit && Net::getInventoryHandler()->canSplit(mItems->getSelectedItem()))
{
Item *item = mItems->getSelectedItem();
- ItemAmountWindow::showWindow(ItemAmountWindow::ItemSplit, this, item,
+ if (item)
+ ItemAmountWindow::showWindow(ItemAmountWindow::ItemSplit, this, item,
(item->getQuantity() - 1));
}
}