Index: src/script/squirrel.cpp =================================================================== --- src/script/squirrel.cpp (revision 18033) +++ src/script/squirrel.cpp (working copy) @@ -229,7 +229,7 @@ if (ret != NULL) sq_getstackobj(vm, -1, ret); /* Reset the top, but don't do so for the AI main function, as we need * a correct stack when resuming. */ - if (suspend == -1) sq_settop(this->vm, top); + if (suspend == -1 || !this->IsSuspended()) sq_settop(this->vm, top); /* Restore the return-value location. */ this->vm->_suspended_target = last_target;