Fix T57083: Grease Pencil / Texture Paint Crash in 2.8

The brush of texture paint hadn't gp_icon
This commit is contained in:
2018-10-08 10:32:41 +02:00
parent 7d38654ecd
commit d12e781810
2 changed files with 5 additions and 2 deletions

View File

@@ -1672,7 +1672,10 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
}
/* reset the icon */
if (ob != NULL && ob->mode & OB_MODE_GPENCIL_PAINT) {
if ((ob != NULL) &&
(ob->mode & OB_MODE_GPENCIL_PAINT) &&
(br->gpencil_settings != NULL))
{
switch (br->gpencil_settings->icon_id) {
case GP_BRUSH_ICON_PENCIL:
br->id.icon_id = ICON_GPBRUSH_PENCIL;