[Bf-blender-cvs] [8299284] master: Correct own recent error, uninitialized var use
Campbell Barton
noreply at git.blender.org
Tue May 26 13:37:16 CEST 2015
Commit: 8299284389fc4992128a15fff5b8269185933827
Author: Campbell Barton
Date: Tue May 26 21:36:11 2015 +1000
Branches: master
https://developer.blender.org/rB8299284389fc4992128a15fff5b8269185933827
Correct own recent error, uninitialized var use
===================================================================
M source/blender/python/intern/bpy_util.c
===================================================================
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c
index 6e26104..5846ccd 100644
--- a/source/blender/python/intern/bpy_util.c
+++ b/source/blender/python/intern/bpy_util.c
@@ -87,9 +87,6 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo
PyObject *pystring;
const char *cstring;
- const char *filename;
- int lineno;
-
if (!PyErr_Occurred())
return 1;
@@ -115,6 +112,9 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo
cstring = _PyUnicode_AsString(pystring);
if (use_location) {
+ const char *filename;
+ int lineno;
+
PyObject *pystring_format; /* workaround, see below */
PyC_FileAndNum(&filename, &lineno);
@@ -130,13 +130,14 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo
BKE_report(reports, RPT_ERROR, cstring);
Py_DECREF(pystring_format); /* workaround */
#endif
+
+ /* not exactly needed. just for testing */
+ fprintf(stderr, TIP_("%s\nlocation: %s:%d\n"), cstring, filename, lineno);
}
else {
BKE_report(reports, RPT_ERROR, cstring);
}
- /* not exactly needed. just for testing */
- fprintf(stderr, TIP_("%s\nlocation: %s:%d\n"), cstring, filename, lineno);
Py_DECREF(pystring);
return 1;
More information about the Bf-blender-cvs
mailing list