diff options
author | Eugene Sandulenko | 2016-09-20 10:39:05 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-20 19:34:48 +0200 |
commit | 0aef5c55d4fbb27b7cb7ed3dda001c9ede205cf5 (patch) | |
tree | fd0584c54824f8e98a158428f8b2376f69ffa7ed /engines/fullpipe | |
parent | e2c0fbe53102c44b63036125b29bd0f809d1dcc4 (diff) | |
download | scummvm-rg350-0aef5c55d4fbb27b7cb7ed3dda001c9ede205cf5.tar.gz scummvm-rg350-0aef5c55d4fbb27b7cb7ed3dda001c9ede205cf5.tar.bz2 scummvm-rg350-0aef5c55d4fbb27b7cb7ed3dda001c9ede205cf5.zip |
FULLPIPE: Fix inventory not being cleared on game load
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/inventory.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 8424e7e976..345a02c83e 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -94,6 +94,11 @@ Inventory2::~Inventory2() { } bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartially + for (uint i = 0; i < _inventoryItems.size(); i++) + delete _inventoryItems[i]; + + _inventoryItems.clear(); + int numInvs = file.readUint32LE(); for (int i = 0; i < numInvs; i++) { |