1
0
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:
Sébastien Helleu
2024-04-25 19:34:32 +02:00
parent ad33036fea
commit 890caf4e8e
2 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -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,
+2 -1
View File
@@ -188,7 +188,8 @@ TEST(GuiBarItem, Update)
TEST(GuiBarItem, Free)
{
/* TODO: write tests */
/* test free of NULL bar item */
gui_bar_item_free (NULL);
}
/*