summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 9aff286ff..8569dc8fb 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -49,9 +49,9 @@ Inventory::Inventory(int type, int size):
mSize(size == -1 ? static_cast<unsigned>(
Net::getInventoryHandler()->getSize(type))
: static_cast<unsigned>(size)),
+ mItems(new Item*[mSize]),
mUsed(0)
{
- mItems = new Item*[mSize];
std::fill_n(mItems, mSize, static_cast<Item*>(nullptr));
}