aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/sound
diff options
context:
space:
mode:
authorMarisa-Chan2014-12-19 17:11:26 +0600
committerMarisa-Chan2014-12-19 17:11:26 +0600
commit169bed1e5e8364875f68a66e7576c6947a11903b (patch)
tree2c144b424298cbd5faec0c58e827b43862ea667b /engines/zvision/sound
parent617623e9bff85f2fc0dd75509dfb93e95e366c8e (diff)
downloadscummvm-rg350-169bed1e5e8364875f68a66e7576c6947a11903b.tar.gz
scummvm-rg350-169bed1e5e8364875f68a66e7576c6947a11903b.tar.bz2
scummvm-rg350-169bed1e5e8364875f68a66e7576c6947a11903b.zip
ZVISION: Fix dereference after null check (CID 1257091)
Diffstat (limited to 'engines/zvision/sound')
-rw-r--r--engines/zvision/sound/zork_raw.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/zvision/sound/zork_raw.cpp b/engines/zvision/sound/zork_raw.cpp
index 78c851e132..393f2eb6a9 100644
--- a/engines/zvision/sound/zork_raw.cpp
+++ b/engines/zvision/sound/zork_raw.cpp
@@ -73,6 +73,9 @@ RawChunkStream::RawChunk RawChunkStream::readNextChunk(Common::SeekableReadStrea
tmp.size = 0;
tmp.data = NULL;
+ if (!stream)
+ return tmp;
+
if (stream && (stream->size() == 0 || stream->eos()))
return tmp;