summaryrefslogtreecommitdiff
path: root/src/resources/inventory/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-22 13:40:32 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-22 13:40:32 +0300
commitf20c99d2bffe798806790e1f1ae838bba494d93c (patch)
tree4a10dad927c5e63b1e7a1038656d14a7e7dd4946 /src/resources/inventory/inventory.cpp
parent2d29847485933bf0e9ccbea4456f5473418d4b18 (diff)
downloadmanaverse-f20c99d2bffe798806790e1f1ae838bba494d93c.tar.gz
manaverse-f20c99d2bffe798806790e1f1ae838bba494d93c.tar.bz2
manaverse-f20c99d2bffe798806790e1f1ae838bba494d93c.tar.xz
manaverse-f20c99d2bffe798806790e1f1ae838bba494d93c.zip
Add missing check in inventory.
Diffstat (limited to 'src/resources/inventory/inventory.cpp')
-rw-r--r--src/resources/inventory/inventory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resources/inventory/inventory.cpp b/src/resources/inventory/inventory.cpp
index efcea0f55..7d78605dc 100644
--- a/src/resources/inventory/inventory.cpp
+++ b/src/resources/inventory/inventory.cpp
@@ -180,7 +180,8 @@ void Inventory::setCards(const int index,
}
Item *const item1 = mItems[index];
- item1->setCards(cards, size);
+ if (item1)
+ item1->setCards(cards, size);
}
void Inventory::clear()