GPv3: Console error after opening layer extras panel

Caused by c80e30684c.
TypeError in console after opening layer extras panel while group is
active.

The fix makes sure `layer` is not `None`.

Pull Request: https://projects.blender.org/blender/blender/pulls/122586
This commit is contained in:
Pratik Borhade
2024-06-03 19:15:06 +02:00
committed by Falk David
parent 4b6479bf9e
commit 059c74dc98

View File

@@ -194,7 +194,9 @@ class GREASE_PENCIL_MT_grease_pencil_add_layer_extra(Menu):
layout.separator()
layout.prop(grease_pencil, "use_autolock_layers", text="Autolock Inactive Layers")
layout.prop(layer, "use_locked_material")
if layer:
layout.prop(layer, "use_locked_material")
class GREASE_PENCIL_MT_group_context_menu(Menu):