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:
authorCampbell Barton <ideasman42@gmail.com>2009-11-10 19:17:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-10 19:17:49 +0300
commitde7504807cdb6ad7f66695636cb97f0deaf57c09 (patch)
tree9da5f4e302fa6b70b4b79c4d73e09156362fb50c /source/blender/python/intern/bpy_util.c
parent7efc2c2375bb591d57f6f3d63b274de48172e43b (diff)
fix error with python exceptions in BPy_errors_to_report
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r--source/blender/python/intern/bpy_util.c5
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");