GPencil: Initialize variable to remove console warning
authorAntonioya <blendergit@gmail.com>
Thu, 18 Apr 2019 14:57:41 +0000 (16:57 +0200)
committerAntonioya <blendergit@gmail.com>
Thu, 18 Apr 2019 14:59:18 +0000 (16:59 +0200)
release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 7c1fa0f..7e76701 100644 (file)
@@ -1732,9 +1732,10 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
             ob = context.object
             if ob:
                 ma = ob.active_material
-                    
-            if brush.gpencil_settings.material:
+            elif brush.gpencil_settings.material:
                 ma = brush.gpencil_settings.material
+            else:
+                ma = None
 
             col.separator()
             subcol = col.column(align=True)