diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-05-15 14:05:46 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-05-15 14:05:58 +0300 |
commit | 3a14c011f9fb35cf7432f6bc7f96cb18cacc8255 (patch) | |
tree | 10abbcb4c3d98c5b58ff4f616fdbe1daae5afaaa /source | |
parent | 04517ee9362908a48d69f7ddfd6d02cf58407190 (diff) |
GPencil: Fix unreported crash using U key in Draw mode
The problem was the preview could be not available when press the key.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 03deab15b1e..407571d18c8 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -507,7 +507,7 @@ const EnumPropertyItem *ED_gpencil_material_enum_itemf(bContext *C, item_tmp.identifier = ma->id.name + 2; item_tmp.name = ma->id.name + 2; item_tmp.value = i; - item_tmp.icon = ma->preview->icon_id; + item_tmp.icon = ma->preview ? ma->preview->icon_id : ICON_NONE; RNA_enum_item_add(&item, &totitem, &item_tmp); } |