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:
Diffstat (limited to 'source/blender/python/intern/bpy_traceback.c')
-rw-r--r--source/blender/python/intern/bpy_traceback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c
index 45977ba400c..1f2458c752f 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -20,7 +20,8 @@
static const char *traceback_filepath(PyTracebackObject *tb, PyObject **coerce)
{
- *coerce = PyUnicode_EncodeFSDefault(tb->tb_frame->f_code->co_filename);
+ PyCodeObject *code = PyFrame_GetCode(tb->tb_frame);
+ *coerce = PyUnicode_EncodeFSDefault(code->co_filename);
return PyBytes_AS_STRING(*coerce);
}
@@ -165,7 +166,7 @@ finally:
bool python_script_error_jump(
const char *filepath, int *r_lineno, int *r_offset, int *r_lineno_end, int *r_offset_end)
{
- /* WARNING(@campbellbarton): The normalized exception is restored (loosing line number info).
+ /* WARNING(@campbellbarton): The normalized exception is restored (losing line number info).
* Ideally this would leave the exception state as it found it, but that needs to be done
* carefully with regards to reference counting, see: T97731. */