diff options
| author | Nipun Garg | 2019-07-17 23:20:28 +0530 |
|---|---|---|
| committer | Eugene Sandulenko | 2019-09-03 17:17:22 +0200 |
| commit | d3ad2ed14aa6ec6495f858a849a5346beda911ff (patch) | |
| tree | 7682cdcd6340fe9a09c3dc4c70489d2f6a45a20f /engines | |
| parent | 0c71ae212105ccbc59045cf319d5ca64b882ae2d (diff) | |
| download | scummvm-rg350-d3ad2ed14aa6ec6495f858a849a5346beda911ff.tar.gz scummvm-rg350-d3ad2ed14aa6ec6495f858a849a5346beda911ff.tar.bz2 scummvm-rg350-d3ad2ed14aa6ec6495f858a849a5346beda911ff.zip | |
HDB: Fix memory leak in Player Graphics
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/hdb/ai-init.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index dbdd24429f..9c7aea4c47 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -920,6 +920,16 @@ AI::~AI() { delete _arrowPaths; delete _triggerList; delete _hereList; + + memset(&_inventory, 0, sizeof(InvEnt) * kMaxInventory); + + // Free Player Graphics + + memset(_clubDownGfx, 0, sizeof(_clubDownGfx)); + memset(_clubUpGfx, 0, sizeof(_clubUpGfx)); + memset(_clubLeftGfx, 0, sizeof(_clubLeftGfx)); + memset(_clubRightGfx, 0, sizeof(_clubRightGfx)); + memset(_slugAttackGfx, 0, sizeof(_slugAttackGfx)); } bool AI::init() { |
