diff options
author | matc <matc> | 2019-07-23 13:29:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-23 13:31:27 +0300 |
commit | 2d98ac33bef3b0dcba7bcffa3c37e35491a01d5c (patch) | |
tree | 716dca1c96cc6ce11f50819bf950e9b69ba18824 | |
parent | 34ad6da4a06ef46cd19945f61cc5f968538546a8 (diff) |
Fix T65402: Syntax error causes CPython assert
-rw-r--r-- | source/blender/python/intern/bpy_traceback.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |