summaryrefslogtreecommitdiff
path: root/src/gui/gui-hotlist.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:01:50 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:01:50 +0100
commit0d059add9aa4debf47e58af1ef6a6a5e72e3a1ac (patch)
tree356cf8fcaca39f978fb525f7c93a324e5391aafb /src/gui/gui-hotlist.c
parenteebb0547e2f2431efaf1adce2a39dd4f5fc8909f (diff)
downloadweechat-0d059add9aa4debf47e58af1ef6a6a5e72e3a1ac.zip
core: check that pointers received in arguments are not NULL in "free" functions
Functions: - hdata_free - infolist_var_free - infolist_item_free - infolist_free - string_shared_free - gui_window_objects_free - gui_color_free - gui_completion_free - gui_filter_free - gui_history_buffer_free - gui_hotlist_free - gui_key_free - gui_lines_free - gui_line_tags_free - gui_line_free - gui_window_tree_free - gui_window_scroll_free
Diffstat (limited to 'src/gui/gui-hotlist.c')
-rw-r--r--src/gui/gui-hotlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c
index c7cc1700d..9bbcf65e0 100644
--- a/src/gui/gui-hotlist.c
+++ b/src/gui/gui-hotlist.c
@@ -96,6 +96,9 @@ gui_hotlist_free (struct t_gui_hotlist **hotlist,
{
struct t_gui_hotlist *new_hotlist;
+ if (!ptr_hotlist)
+ return;
+
/* remove hotlist from queue */
if (*last_hotlist == ptr_hotlist)
*last_hotlist = ptr_hotlist->prev_hotlist;