diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-05-23 05:53:31 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-23 05:53:31 -0400 |
commit | 1407a08f0087905edae30ac3793e83757ff56d4c (patch) | |
tree | e9825de51a072bca6b71cdb5ec0c4cf713c87eb7 /src/gui/inventorywindow.cpp | |
parent | 8766348bdc55e6aea795cbb765fadea08a70476c (diff) | |
download | mana-1407a08f0087905edae30ac3793e83757ff56d4c.tar.gz mana-1407a08f0087905edae30ac3793e83757ff56d4c.tar.bz2 mana-1407a08f0087905edae30ac3793e83757ff56d4c.tar.xz mana-1407a08f0087905edae30ac3793e83757ff56d4c.zip |
Fixes a segmentfault and disables shift split for eA
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r-- | src/gui/inventorywindow.cpp | 5 |
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)); } } |