diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-10 16:21:11 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-10 16:21:11 +0200 |
commit | 54bf589d7da7b714002bf675f20c053426544d6f (patch) | |
tree | d0ce6d388ad7cfe9eb9e8b08ff5b589425b97d44 /src/gui/gui-bar-item.c | |
parent | 8c8a0c0826ce66c83b08baf9470a2e6a6140b201 (diff) | |
download | weechat-54bf589d7da7b714002bf675f20c053426544d6f.zip |
core, plugins: fix conditions to insert elements in linked lists
This removes scan-build warnings about dereference of last_xxx null pointers.
Diffstat (limited to 'src/gui/gui-bar-item.c')
-rw-r--r-- | src/gui/gui-bar-item.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index f9e59b285..33b6e9113 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -557,7 +557,7 @@ gui_bar_item_new (struct t_weechat_plugin *plugin, const char *name, /* add bar item to bar items queue */ new_bar_item->prev_item = last_gui_bar_item; - if (gui_bar_items) + if (last_gui_bar_item) last_gui_bar_item->next_item = new_bar_item; else gui_bar_items = new_bar_item; |