summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-25 19:34:32 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-26 21:17:13 +0200
commit890caf4e8e44971ae94bea72193560b8ae56aceb (patch)
treec98b5ac9c16893a6d70555b7b3c78a71e12717b7 /src/gui
parentad33036fead1b0ca765494b521a5fb7c384b0be6 (diff)
downloadweechat-890caf4e8e44971ae94bea72193560b8ae56aceb.zip
core: remove check of NULL pointers before calling gui_bar_item_free() (issue #865)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-bar-item-custom.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/gui-bar-item-custom.c b/src/gui/gui-bar-item-custom.c
index fac56ab40..8b86609b5 100644
--- a/src/gui/gui-bar-item-custom.c
+++ b/src/gui/gui-bar-item-custom.c
@@ -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,