From b3b4435bc797fa4f5096095b81fa05aa71948db7 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 25 Oct 2011 10:51:16 +0200 Subject: [PATCH] SCUMM: Initialize Sprite fields in constructor. This fixes a crash when HE games return from init() early due to the required color mode not being available. (cherry picked from commit 63aa0ef6f356c1aab2f43fe6fc96cce226fbb98e) --- engines/scumm/he/sprite_he.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp index 081110c7cd1..ec69ae11b42 100644 --- a/engines/scumm/he/sprite_he.cpp +++ b/engines/scumm/he/sprite_he.cpp @@ -33,7 +33,12 @@ namespace Scumm { -Sprite::Sprite(ScummEngine_v90he *vm) : _vm(vm) { +Sprite::Sprite(ScummEngine_v90he *vm) + : + _vm(vm), + _spriteGroups(0), + _spriteTable(0), + _activeSpritesTable(0) { } Sprite::~Sprite() {