Commit: 2d98ac33bef3b0dcba7bcffa3c37e35491a01d5c
Author: matc
Date: Tue Jul 23 20:29:11 2019 +1000
Branches: master
https://developer.blender.org/rB2d98ac33bef3b0dcba7bcffa3c37e35491a01d5c
Fix T65402: Syntax error causes CPython assert
===================================================================
M source/blender/python/intern/bpy_traceback.c
===================================================================
diff --git a/source/blender/python/intern/bpy_traceback.c
b/source/blender/python/intern/bpy_traceback.c
index c9c9e4adafb..06d8b645ac7 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -143,7 +143,6 @@ void python_script_error_jump(const char *filepath, int
*lineno, int *offset)
/* no traceback available when SyntaxError.
* python has no api's to this. reference parse_syntax_error() from
pythonrun.c */
PyErr_NormalizeException(&exception, &value, (PyObject **)&tb);
- PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference!
*/
if (value) { /* should always be true */
PyObject *message;
@@ -165,6 +164,7 @@ void python_script_error_jump(const char *filepath, int
*lineno, int *offset)
*lineno = -1;
}
}
+ PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference!
*/
}
else {
PyErr_NormalizeException(&exception, &value, (PyObject **)&tb);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs