Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-05-15 14:05:46 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-05-15 14:05:58 +0300
commit3a14c011f9fb35cf7432f6bc7f96cb18cacc8255 (patch)
tree10abbcb4c3d98c5b58ff4f616fdbe1daae5afaaa /source/blender/editors/gpencil/gpencil_utils.c
parent04517ee9362908a48d69f7ddfd6d02cf58407190 (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/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c2
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);
}