aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-05-30 10:38:36 +0200
committerStrangerke2014-05-30 10:38:36 +0200
commit8654042d05117cd5c435b2aeb8cdaffa50545e8e (patch)
tree53c6af0144daa75b5065085ea9247a434759099a /engines
parent6275f50d8052e480dd279f103e472e37a90493a8 (diff)
downloadscummvm-rg350-8654042d05117cd5c435b2aeb8cdaffa50545e8e.tar.gz
scummvm-rg350-8654042d05117cd5c435b2aeb8cdaffa50545e8e.tar.bz2
scummvm-rg350-8654042d05117cd5c435b2aeb8cdaffa50545e8e.zip
CGE2: Silence a warning by adding a safeguard in step()
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/vga13h.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index 98daf56f3d..09e8accd1c 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -446,7 +446,7 @@ void Sprite::step(int nr) {
if (_ext) {
V3D p = _pos3D;
- Seq *seq;
+ Seq *seq = nullptr;
if (nr < 0)
_seqPtr = _ext->_seq[_seqPtr]._next;
@@ -466,7 +466,7 @@ void Sprite::step(int nr) {
warning("Sprite::step()");
}
}
- if (seq->_dly >= 0)
+ if (seq && (seq->_dly >= 0))
_time = seq->_dly;
} else if (_vm->_waitRef && _vm->_waitRef == _ref)
_vm->_waitRef = 0;