diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/score.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 9e40f0f62a..b078382513 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -722,8 +722,9 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id, break; } - for (uint child = 0; child < res->children.size(); child++) - _loadedCast->getVal(id)->_children.push_back(res->children[child]); + if (_loadedCast->contains(id)) // Skip unhandled casts + for (uint child = 0; child < res->children.size(); child++) + _loadedCast->getVal(id)->_children.push_back(res->children[child]); free(data); |