diff options
author | Eugene Sandulenko | 2016-12-01 08:23:11 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-12-01 08:23:11 +0100 |
commit | 44e5c01e35fa0d41868e99b0d5656c75e1e42557 (patch) | |
tree | 766e5522448662881edc9f29593ecf8c52247135 /engines/fullpipe | |
parent | 69ed293003a187f2a7e807785e652e3378f1337a (diff) | |
download | scummvm-rg350-44e5c01e35fa0d41868e99b0d5656c75e1e42557.tar.gz scummvm-rg350-44e5c01e35fa0d41868e99b0d5656c75e1e42557.tar.bz2 scummvm-rg350-44e5c01e35fa0d41868e99b0d5656c75e1e42557.zip |
FULLPIPE: Fix crash on scene switch
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/motion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 6edbd7bc94..05f13d4a8b 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -779,6 +779,9 @@ MovGraphItem::MovGraphItem() { } void MovGraphItem::free() { + if (!mi_movitems) + return; + for (uint i = 0; i < mi_movitems->size(); i++) { (*mi_movitems)[i]->movarr->_movSteps.clear(); delete (*mi_movitems)[i]->movarr; @@ -914,6 +917,7 @@ Common::Array<MovItem *> *MovGraph::getPaths(StaticANIObject *ani, int x, int y, Common::Array<MovItem *> *movitems = getPaths(&_items[idx]->movarr, (*movarr)[i], &sz); if (sz > 0) { + _items[idx]->mi_movitems = new Common::Array<MovItem *>; for (int j = 0; j < sz; j++) _items[idx]->mi_movitems->push_back(movitems[j]); } |