summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-30 22:16:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-30 22:16:07 +0300
commitbe1962973deaa161491b6592cbf21eb3e6700cc9 (patch)
tree5ddbba2e492cab6614e815c98f9bee9edc7bf2ba /src/inventory.cpp
parentce1919c195962ef683ad0af7ee33ce7973c0f03c (diff)
downloadplus-be1962973deaa161491b6592cbf21eb3e6700cc9.tar.gz
plus-be1962973deaa161491b6592cbf21eb3e6700cc9.tar.bz2
plus-be1962973deaa161491b6592cbf21eb3e6700cc9.tar.xz
plus-be1962973deaa161491b6592cbf21eb3e6700cc9.zip
Allow drag&drop items inside npc item container.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 5ee1e34c0..61434754f 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -199,6 +199,8 @@ void Inventory::removeItem(const int id)
void Inventory::removeItemAt(const int index)
{
+ if (!mItems[index])
+ return;
delete2(mItems[index]);
mUsed--;
if (mUsed < 0) // Already at 0, no need to distribute event