diff options
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqvm.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp index bed94bf6e..fb3785787 100644 --- a/src/3rdparty/squirrel/squirrel/sqvm.cpp +++ b/src/3rdparty/squirrel/squirrel/sqvm.cpp @@ -749,7 +749,16 @@ common_call: case OT_NATIVECLOSURE: { bool suspend; _suspended_target = ct_target; - _GUARD(CallNative(_nativeclosure(clo), arg3, ct_stackbase, clo,suspend)); + try { + _GUARD(CallNative(_nativeclosure(clo), arg3, ct_stackbase, clo,suspend)); + } catch (...) { + _suspended = SQTrue; + _suspended_target = ct_target; + _suspended_root = ci->_root; + _suspended_traps = traps; + _suspend_varargs = ci->_vargs; + throw; + } if(suspend){ _suspended = SQTrue; _suspended_target = ct_target; |