diff options
author | Walter van Niftrik | 2010-02-07 14:32:49 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-02-07 14:32:49 +0000 |
commit | 635c7d970c1083cb456ac8f9b2605cc71ebf0c7f (patch) | |
tree | 0f2bda188ec98d75dee9450e31d57b6344844c3d /engines/sci/engine | |
parent | 57f9f4cc09b361648905210bf14f7f1ce91869b0 (diff) | |
download | scummvm-rg350-635c7d970c1083cb456ac8f9b2605cc71ebf0c7f.tar.gz scummvm-rg350-635c7d970c1083cb456ac8f9b2605cc71ebf0c7f.tar.bz2 scummvm-rg350-635c7d970c1083cb456ac8f9b2605cc71ebf0c7f.zip |
SCI: Fix VM crash when NULL_REG is passed to AvoidPath (SCI32).
svn-id: r47964
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 2f8dcb23b6..c168df3bf9 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1392,7 +1392,7 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) { if (argc < 7) error("[avoidpath] Not enough arguments"); - poly_list = GET_SEL32(s->_segMan, argv[4], SELECTOR(elements)); + poly_list = (!argv[4].isNull() ? GET_SEL32(s->_segMan, argv[4], SELECTOR(elements)) : NULL_REG); width = argv[5].toUint16(); height = argv[6].toUint16(); if (argc > 7) |