aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge/cge.cpp3
-rw-r--r--engines/cge/cge_main.cpp1
-rw-r--r--engines/cge/vga13h.cpp1
3 files changed, 3 insertions, 2 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 884af2cd46..527b16d288 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -58,6 +58,7 @@ void CGEEngine::setup() {
// Initialise fields
_lastFrame = 0;
_hero = NULL;
+ _shadow = NULL;
// Create debugger console
_console = new CGEConsole(this);
@@ -81,8 +82,6 @@ void CGEEngine::setup() {
_sprite = new Sprite(this, NULL);
_miniCave = new Sprite(this, NULL);
_miniCave->_flags._kill = false;
- _shadow = new Sprite(this, NULL);
- _shadow->_flags._kill = false;
_horzLine = new HorizLine(this);
_infoLine = new InfoLine(this, INFO_W);
_cavLight = new CavLight(this);
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 16e21e1f73..6e2721f8fc 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -1629,6 +1629,7 @@ void CGEEngine::runGame() {
if ((_shadow = _sprite) != NULL) {
_shadow->_ref = 2;
_shadow->_flags._tran = true;
+ _shadow->_flags._kill = false;
_hero->_flags._shad = true;
_vga->_showQ->insert(_vga->_spareQ->remove(_shadow), _hero);
}
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index d0e267ef38..c36d747295 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -880,6 +880,7 @@ void Queue::insert(Sprite *spr, Sprite *nxt) {
if (!_tail)
_tail = spr;
} else {
+ assert(nxt);
spr->_next = nxt;
spr->_prev = nxt->_prev;
if (spr->_prev)