[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32234] trunk/blender/release/scripts/op/ console_python.py: fix for crash when using the console to load a file, when the UI changes dont attempt to add to the console's buffer.

Campbell Barton ideasman42 at gmail.com
Fri Oct 1 19:55:35 CEST 2010


Revision: 32234
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32234
Author:   campbellbarton
Date:     2010-10-01 19:55:35 +0200 (Fri, 01 Oct 2010)

Log Message:
-----------
fix for crash when using the console to load a file, when the UI changes dont attempt to add to the console's buffer.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/console_python.py

Modified: trunk/blender/release/scripts/op/console_python.py
===================================================================
--- trunk/blender/release/scripts/op/console_python.py	2010-10-01 17:24:30 UTC (rev 32233)
+++ trunk/blender/release/scripts/op/console_python.py	2010-10-01 17:55:35 UTC (rev 32234)
@@ -161,6 +161,10 @@
     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:





More information about the Bf-blender-cvs mailing list