diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-30 22:16:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-30 22:16:07 +0300 |
commit | be1962973deaa161491b6592cbf21eb3e6700cc9 (patch) | |
tree | 5ddbba2e492cab6614e815c98f9bee9edc7bf2ba /src/inventory.cpp | |
parent | ce1919c195962ef683ad0af7ee33ce7973c0f03c (diff) | |
download | ManaVerse-be1962973deaa161491b6592cbf21eb3e6700cc9.tar.gz ManaVerse-be1962973deaa161491b6592cbf21eb3e6700cc9.tar.bz2 ManaVerse-be1962973deaa161491b6592cbf21eb3e6700cc9.tar.xz ManaVerse-be1962973deaa161491b6592cbf21eb3e6700cc9.zip |
Allow drag&drop items inside npc item container.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 2 |
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 |