diff options
-rw-r--r-- | engines/lastexpress/game/entities.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 8741a4873b..639470d502 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -1174,8 +1174,12 @@ void Entities::processFrame(EntityIndex entityIndex, bool keepPreviousFrame, boo getScenes()->addToQueue(frame); // Keep previous frame if needed and store the new frame - if (keepPreviousFrame) + if (keepPreviousFrame) { + SAFE_DELETE(data->frame1); data->frame1 = data->frame; + } else { + SAFE_DELETE(data->frame); + } data->frame = frame; |