GP: Remove unneeded code to get icon
Test the object type is not good idea here.
This commit is contained in:
parent
11f9018ec6
commit
bd7cb42f3d
Notes:
blender-bot
2023-02-14 05:09:24 +01:00
Referenced by issue #57390, Crash when adding a new scene with empty
|
@ -646,13 +646,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
|
|||
sbuts->dataicon = RNA_struct_ui_icon(ptr->type);
|
||||
}
|
||||
else {
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
if (ob->type == OB_GPENCIL) {
|
||||
sbuts->dataicon = ICON_GREASEPENCIL;
|
||||
}
|
||||
else {
|
||||
sbuts->dataicon = ICON_EMPTY_DATA;
|
||||
}
|
||||
sbuts->dataicon = ICON_EMPTY_DATA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue