diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-06-27 10:13:29 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2022-06-27 12:43:53 +0300 |
commit | cfc6eb739138eb02ea882b8360afda60774923e8 (patch) | |
tree | 7bb1c232a6d5fc9a7bbf005ba027a1289a5ca02d /release | |
parent | 49fd02de61d4fa1fbd29df82987cc9be064537d8 (diff) |
Fix T99178: Console warning using search (F3) in grease pencil draw mode
The preview data was not available in this context and need to be checked to avoid the warning.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 9864bb3336f..df6d43ffb0f 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -303,7 +303,7 @@ class GPENCIL_MT_material_active(Menu): for slot in ob.material_slots: mat = slot.material - if mat: + if mat and mat.id_data and mat.id_data.preview: icon = mat.id_data.preview.icon_id layout.operator("gpencil.material_set", text=mat.name, icon_value=icon).slot = mat.name |