mirror of
https://github.com/FelixKratz/SketchyBar
synced 2025-02-17 04:58:28 +00:00
avoid crashing on unimplemented item remove
This commit is contained in:
parent
7c7273243b
commit
4b9f2ae10a
1 changed files with 5 additions and 0 deletions
|
@ -110,6 +110,11 @@ void bar_manager_move_item(struct bar_manager* bar_manager, struct bar_item* ite
|
|||
}
|
||||
|
||||
void bar_manager_remove_item(struct bar_manager* bar_manager, struct bar_item* bar_item) {
|
||||
if (bar_item->position == POSITION_POPUP) {
|
||||
// FIXME: Popup items must be explicitly removed from the popup lists, as done for groups.
|
||||
printf("Removing popup items is not implemented...\n");
|
||||
return;
|
||||
}
|
||||
if (bar_manager->bar_item_count <= 0 || !bar_item) return;
|
||||
if (bar_manager->bar_item_count == 1) {
|
||||
free(bar_manager->bar_items);
|
||||
|
|
Loading…
Add table
Reference in a new issue