[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43210] trunk/blender/release/scripts/ startup/bl_ui/space_node.py: Fix for last commit, missed check for ob, could cause errors when object was removed.

Thomas Dinges blender at dingto.org
Fri Jan 6 23:55:21 CET 2012


Revision: 43210
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43210
Author:   dingto
Date:     2012-01-06 22:55:15 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
Fix for last commit, missed check for ob, could cause errors when object was removed. 

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_node.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_node.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_node.py	2012-01-06 22:31:31 UTC (rev 43209)
+++ trunk/blender/release/scripts/startup/bl_ui/space_node.py	2012-01-06 22:55:15 UTC (rev 43210)
@@ -48,7 +48,7 @@
             if scene.render.use_shading_nodes:
                 layout.prop(snode, "shader_type", text="", expand=True)
 
-            if not scene.render.use_shading_nodes or snode.shader_type == 'OBJECT':
+            if (not scene.render.use_shading_nodes or snode.shader_type == 'OBJECT') and ob:
                 # Show material.new when no active ID/slot exists
                 if not id_from and ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'METABALL'}:
                     layout.template_ID(ob, "active_material", new="material.new")



More information about the Bf-blender-cvs mailing list