Fix T55507: Crash due to GPencil brush icon management, when there is no active object.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user