Fix T55507: Crash due to GPencil brush icon management, when there is no active object.
This commit is contained in:
parent
4cde92303f
commit
13ac92d057
Notes:
blender-bot
2023-02-14 05:43:12 +01:00
|
@ -1636,7 +1636,7 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
|
|||
}
|
||||
|
||||
/* reset the icon */
|
||||
if (ob->mode & OB_MODE_GPENCIL_PAINT) {
|
||||
if (ob != NULL && ob->mode & OB_MODE_GPENCIL_PAINT) {
|
||||
switch (br->gpencil_settings->icon_id) {
|
||||
case GP_BRUSH_ICON_PENCIL:
|
||||
br->id.icon_id = ICON_GPBRUSH_PENCIL;
|
||||
|
|
Loading…
Reference in New Issue