Fix warning from previous commit:
authorAntony Riakiotakis <kalast@gmail.com>
Wed, 28 Jan 2015 14:24:21 +0000 (15:24 +0100)
committerAntony Riakiotakis <kalast@gmail.com>
Wed, 28 Jan 2015 14:24:37 +0000 (15:24 +0100)
Set slot to NULL when no active slot is found.

release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 774d21e89b541e5cf0403af21bfce56faae93580..9879ba8f4b92dbd70ab45c4605ed7149a6cf0c8f 100644 (file)
@@ -1126,6 +1126,8 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
 
                 if mat.texture_paint_slots:
                     slot = mat.texture_paint_slots[mat.paint_active_slot]
+                else:
+                    slot = None
 
                 if (not mat.use_nodes) and context.scene.render.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}:
                     row = col.row(align=True)