From f9422e43478aecb9430466a7da4651d0e3fc7a58 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 19 Jul 2019 23:18:41 +0200 Subject: 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 --- engines/hdb/ai.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'engines') diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index bb862220a2..ab8cb9abe4 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -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) { 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; } } -- cgit v1.2.3