From 8654042d05117cd5c435b2aeb8cdaffa50545e8e Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 30 May 2014 10:38:36 +0200 Subject: CGE2: Silence a warning by adding a safeguard in step() --- engines/cge2/vga13h.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3