1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 05:46:38 +02:00

core: remove check of NULL pointers before calling gui_bar_window_free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 19:36:50 +02:00
parent 890caf4e8e
commit a7b21fa647
2 changed files with 4 additions and 3 deletions
+1 -2
View File
@@ -842,8 +842,7 @@ gui_bar_config_change_hidden (const void *pointer, void *data,
{
if (CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
if (ptr_bar->bar_window)
gui_bar_window_free (ptr_bar->bar_window, NULL);
gui_bar_window_free (ptr_bar->bar_window, NULL);
}
else
{
+3 -1
View File
@@ -382,7 +382,9 @@ TEST(GuiBarWindow, SetCurrentSize)
TEST(GuiBarWindow, Free)
{
/* TODO: write tests */
/* test free of NULL bar window */
gui_bar_window_free (NULL, gui_current_window);
gui_bar_window_free (NULL, NULL);
}
/*