Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/python/intern/bpy_traceback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c
index 13af254c286..fb89925400e 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -124,8 +124,11 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
*offset = 0;
PyErr_Fetch(&exception, &value, (PyObject **)&tb);
+ if (exception == NULL) {
+ return;
+ }
- if (exception && PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError)) {
+ if (PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError)) {
/* no trace-back available when `SyntaxError`.
* python has no API's to this. reference #parse_syntax_error() from pythonrun.c */
PyErr_NormalizeException(&exception, &value, (PyObject **)&tb);