From 5357fa2467dce4457bb3632749506c083845cdee Mon Sep 17 00:00:00 2001 From: yexo Date: Wed, 27 May 2009 23:59:51 +0000 Subject: [PATCH] (svn r16454) -Fix (r16181, r16241): fix the try/catch bug fixed in r16181 and reintroduced in r16241 again, this time without breaking the regression test. --- src/3rdparty/squirrel/squirrel/sqvm.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp index bed94bf6e0..fb37857876 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;