From ebebc4ded11e8ecb38b57aa47f5ba80d26b9567c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 3 Jun 2015 17:08:28 +1000 Subject: Correct own fix reference before assignment 3rd fix for silly exception conversion! --- source/blender/python/intern/bpy_util.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index e4571e71a52..e876adfa58e 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -121,9 +121,12 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo } #if 0 /* ARG!. workaround for a bug in blenders use of vsnprintf */ - BKE_reportf(reports, RPT_ERROR, "%s\nlocation: %s:%d\n", cstring, filename, lineno); + BKE_reportf(reports, RPT_ERROR, "%s\nlocation: %s:%d\n", _PyUnicode_AsString(pystring), filename, lineno); #else - pystring_format = PyUnicode_FromFormat(TIP_("%s\nlocation: %s:%d\n"), cstring, filename, lineno); + pystring_format = PyUnicode_FromFormat( + TIP_("%s\nlocation: %s:%d\n"), + _PyUnicode_AsString(pystring), filename, lineno); + cstring = _PyUnicode_AsString(pystring_format); BKE_report(reports, RPT_ERROR, cstring); -- cgit v1.2.3