diff options
author | Strangerke | 2013-11-01 14:15:19 +0100 |
---|---|---|
committer | Strangerke | 2013-11-01 14:15:19 +0100 |
commit | 79ecd017e24515e5d9a77e32110a932c7d04b582 (patch) | |
tree | c286decefca1fc3b583f6c69598d5d61f20bb69e /engines/hugo/inventory.cpp | |
parent | f1abc0c302a8576415086626f6805acfe997459d (diff) | |
download | scummvm-rg350-79ecd017e24515e5d9a77e32110a932c7d04b582.tar.gz scummvm-rg350-79ecd017e24515e5d9a77e32110a932c7d04b582.tar.bz2 scummvm-rg350-79ecd017e24515e5d9a77e32110a932c7d04b582.zip |
HUFO: Fix CID 1002880, 1002881. Use nullptr where possible instead of 0
Diffstat (limited to 'engines/hugo/inventory.cpp')
-rw-r--r-- | engines/hugo/inventory.cpp | 4 |
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 { |