diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-10 19:17:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-10 19:17:49 +0300 |
commit | de7504807cdb6ad7f66695636cb97f0deaf57c09 (patch) | |
tree | 9da5f4e302fa6b70b4b79c4d73e09156362fb50c /source/blender/python | |
parent | 7efc2c2375bb591d57f6f3d63b274de48172e43b (diff) |
fix error with python exceptions in BPy_errors_to_report
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index 86407e0c818..174d1aa342f 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -162,12 +162,15 @@ void BPY_getFileAndNum(char **filename, int *lineno) getframe = PySys_GetObject("_getframe"); // borrowed if (getframe==NULL) { + PyErr_Clear(); return; } frame = PyObject_CallObject(getframe, NULL); - if (frame==NULL) + if (frame==NULL) { + PyErr_Clear(); return; + } if (filename) { co_filename= PyObject_GetAttrStringArgs(frame, 1, "f_code", "co_filename"); |