mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
core: remove check of NULL pointers before calling gui_bar_item_free() (issue #865)
This commit is contained in:
@@ -374,8 +374,7 @@ gui_bar_item_custom_alloc (const char *name)
|
||||
void
|
||||
gui_bar_item_custom_create_bar_item (struct t_gui_bar_item_custom *item)
|
||||
{
|
||||
if (item->bar_item)
|
||||
gui_bar_item_free (item->bar_item);
|
||||
gui_bar_item_free (item->bar_item);
|
||||
item->bar_item = gui_bar_item_new (
|
||||
NULL,
|
||||
item->name,
|
||||
|
||||
@@ -188,7 +188,8 @@ TEST(GuiBarItem, Update)
|
||||
|
||||
TEST(GuiBarItem, Free)
|
||||
{
|
||||
/* TODO: write tests */
|
||||
/* test free of NULL bar item */
|
||||
gui_bar_item_free (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user