diff options
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 5ec5606845..9bf5915ec3 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -257,6 +257,12 @@ void Parallaction_ns::changeLocation(char *location) { _animations.remove(&_char._ani); + // WORKAROUND: eat up any pending short-lived job that may be referring to the + // current location before the actual switch is performed, or engine may + // segfault because of invalid pointers. + runJobs(); + runJobs(); + freeLocation(); char buf[100]; strcpy(buf, location); |