GPencil: Fix unreported crash using U key in Draw mode
The problem was the preview could be not available when press the key.
This commit is contained in:
parent
04517ee936
commit
3a14c011f9
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue