From 5ad4e157e5398347651a0da0db07f9daf01bf373 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 30 May 2014 10:56:02 +0200 Subject: CGE2: Silence a warning in runCommand --- engines/cge2/snail.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index 73d29cd59f..f00b02c7bd 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -104,7 +104,7 @@ void CommandHandler::runCommand() { } ++_tail; _vm->_taken = false; - Sprite *spr; + Sprite *spr = nullptr; if (tailCmd._commandType > kCmdSpr) spr = (tailCmd._ref < 0) ? ((Sprite *)tailCmd._spritePtr) : _vm->locate(tailCmd._ref); @@ -314,7 +314,7 @@ void CommandHandler::runCommand() { break; } - if (_vm->_taken) + if (_vm->_taken && spr) _vm->_spare->dispose(spr); if (!_turbo) -- cgit v1.2.3