GP: Remove unneeded code to get icon

Test the object type is not good idea here.
This commit is contained in:
Antonio Vazquez 2018-10-29 17:49:26 +01:00
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
1 changed files with 1 additions and 7 deletions

View File

@ -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;
}
}
}