make sure BPY_Err_Handle clears python errors, even if the exception cant be printed. Added PyErr_Clear() incase there are other references to exception data (sys.exc_info() from python)

This commit is contained in:
2008-10-22 07:09:15 +00:00
parent 5987488fd0
commit 69c6bd604c
2 changed files with 18 additions and 7 deletions

View File

@@ -268,6 +268,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
* This is especially bad when the PyObject for the wrapped data is free'd, after blender
* has alredy dealocated the pointer */
PySys_SetObject( "last_traceback", Py_None);
PyErr_Clear(); /* just to be sure */
return;
}
@@ -311,6 +312,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
* This is especially bad when the PyObject for the wrapped data is free'd, after blender
* has alredy dealocated the pointer */
PySys_SetObject( "last_traceback", Py_None);
PyErr_Clear(); /* just to be sure */
//PyRun_SimpleString(m_scriptText.Ptr());
}