diff options
author | Strangerke | 2014-05-30 10:56:02 +0200 |
---|---|---|
committer | Strangerke | 2014-05-30 10:56:02 +0200 |
commit | 5ad4e157e5398347651a0da0db07f9daf01bf373 (patch) | |
tree | 4984fbb1f20b92c8216a5fecbe2b6b867b024ba2 /engines | |
parent | 8a712c840d4c65edf4c1f51273d77c6c38ca80a6 (diff) | |
download | scummvm-rg350-5ad4e157e5398347651a0da0db07f9daf01bf373.tar.gz scummvm-rg350-5ad4e157e5398347651a0da0db07f9daf01bf373.tar.bz2 scummvm-rg350-5ad4e157e5398347651a0da0db07f9daf01bf373.zip |
CGE2: Silence a warning in runCommand
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge2/snail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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) |