aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo/inventory.cpp')
-rw-r--r--engines/hugo/inventory.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp
index c2495beadb..03df997866 100644
--- a/engines/hugo/inventory.cpp
+++ b/engines/hugo/inventory.cpp
@@ -44,7 +44,8 @@ namespace Hugo {
static const int kMaxDisp = (kXPix / kInvDx); // Max icons displayable
-InventoryHandler::InventoryHandler(HugoEngine *vm) : _vm(vm), _invent(0) {
+InventoryHandler::InventoryHandler(HugoEngine *vm) : _vm(vm) {
+ _invent = nullptr;
_firstIconId = 0;
_inventoryState = kInventoryOff; // Inventory icon bar state
_inventoryHeight = 0; // Inventory icon bar pos
@@ -62,6 +63,7 @@ void InventoryHandler::setInventoryState(Istate state) {
void InventoryHandler::freeInvent() {
free(_invent);
+ _invent = nullptr;
}
int16 InventoryHandler::getInventoryObjId() const {