HDB: Fix another incorrect allocation/deallocation.

This leads to double free, because gfxList contains list to pointers to gfxCache,
which is managed by the Gfx code
This commit is contained in:
Eugene Sandulenko 2019-07-19 23:18:41 +02:00
parent b96049a236
commit f9422e4347

View File

@ -596,13 +596,6 @@ struct AnimTarget {
AnimTarget() : x(0), y(0), start(0), end(0), vel(0), animCycle(0), animFrame(0), killAuto(false), inMap(false) { AnimTarget() : x(0), y(0), start(0), end(0), vel(0), animCycle(0), animFrame(0), killAuto(false), inMap(false) {
for (int i = 0; i < kMaxAnimTFrames; i++) { for (int i = 0; i < kMaxAnimTFrames; i++) {
gfxList[i] = new Tile;
}
}
~AnimTarget() {
for (int i = 0; i < kMaxAnimTFrames; i++) {
delete gfxList[i];
gfxList[i] = NULL; gfxList[i] = NULL;
} }
} }