From 387b34f0c2b768fcf1972575930e9ae822b7aca6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 Mar 2022 17:11:34 +1100 Subject: Cleanup: return success from python_script_error_jump Relying on checks for the assignment of return arguments isn't so clear especially when there are multiple return arguments. --- source/blender/python/intern/bpy_interface_run.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/python/intern/bpy_interface_run.c') diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c index 8f7437ac1da..9299bd196e2 100644 --- a/source/blender/python/intern/bpy_interface_run.c +++ b/source/blender/python/intern/bpy_interface_run.c @@ -39,8 +39,7 @@ static void python_script_error_jump_text(Text *text, const char *filepath) { int lineno, lineno_end; int offset, offset_end; - python_script_error_jump(filepath, &lineno, &offset, &lineno_end, &offset_end); - if (lineno != -1) { + if (python_script_error_jump(filepath, &lineno, &offset, &lineno_end, &offset_end)) { /* Start at the end so cursor motion that looses the selection, * leaves the cursor from the most useful place. * Also, the end can't always be set, so don't give it priority. */ -- cgit v1.2.3