From ee84a5b0829b504ac1dbbf1b2405efead3de0be8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Oct 2010 17:55:35 +0000 Subject: [PATCH] fix for crash when using the console to load a file, when the UI changes dont attempt to add to the console's buffer. --- release/scripts/op/console_python.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/scripts/op/console_python.py b/release/scripts/op/console_python.py index 601fab23617..3d9ed098de7 100644 --- a/release/scripts/op/console_python.py +++ b/release/scripts/op/console_python.py @@ -161,6 +161,10 @@ def execute(context): stdout.truncate(0) stderr.truncate(0) + # special exception. its possible the command loaded a new user interface + if hash(sc) != hash(context.space_data): + return + bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT') if is_multiline: