Correct own fix reference before assignment

3rd fix for silly exception conversion!
This commit is contained in:
Campbell Barton 2015-06-03 17:08:28 +10:00
parent 2517f5c97c
commit ebebc4ded1
1 changed files with 5 additions and 2 deletions

View File

@ -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);