diff options
author | Nipun Garg | 2019-07-18 02:19:18 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:23 +0200 |
commit | 161f9e67070f38906cd62b7db65d1d6cf2802823 (patch) | |
tree | c672e3075942efc60f94e4f1aec2dbd42cd2b90e /engines/hdb/ai.h | |
parent | e9e654d7db8c6b865c6f168f6f35663af85fce85 (diff) | |
download | scummvm-rg350-161f9e67070f38906cd62b7db65d1d6cf2802823.tar.gz scummvm-rg350-161f9e67070f38906cd62b7db65d1d6cf2802823.tar.bz2 scummvm-rg350-161f9e67070f38906cd62b7db65d1d6cf2802823.zip |
HDB: NULL each tile after calling destructor
Diffstat (limited to 'engines/hdb/ai.h')
-rw-r--r-- | engines/hdb/ai.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 8b25008648..533d4310a9 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -550,51 +550,61 @@ struct AIEntity { blinkFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete blinkGfx[i]; + blinkGfx[i] = NULL; } special1Frames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete special1Gfx[i]; + special1Gfx[i] = NULL; } standdownFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete standdownGfx[i]; + standdownGfx[i] = NULL; } standupFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete standupGfx[i]; + standupGfx[i] = NULL; } standleftFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete standleftGfx[i]; + standleftGfx[i] = NULL; } standrightFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete standrightGfx[i]; + standrightGfx[i] = NULL; } movedownFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete movedownGfx[i]; + movedownGfx[i] = NULL; } moveupFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete moveupGfx[i]; + moveupGfx[i] = NULL; } moveleftFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete moveleftGfx[i]; + moveleftGfx[i] = NULL; } moverightFrames = 0; for (int i = 0; i < kMaxAnimFrames; i++) { delete moverightGfx[i]; + moverightGfx[i] = NULL; } } @@ -652,6 +662,7 @@ struct AnimTarget { ~AnimTarget() { for (int i = 0; i < kMaxAnimTFrames; i++) { delete gfxList[i]; + gfxList[i] = NULL; } } }; @@ -680,6 +691,12 @@ struct DlvEnt { destTextName[0] = 0; destGfxName[0] = 0; } + ~DlvEnt() { + delete itemGfx; + itemGfx = NULL; + delete destGfx; + destGfx = NULL; + } }; struct Waypoint { |