1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core, plugins: fix conditions to insert elements in linked lists

This removes scan-build warnings about dereference of last_xxx null pointers.
This commit is contained in:
Sébastien Helleu
2017-06-10 16:21:11 +02:00
parent 8c8a0c0826
commit 54bf589d7d
25 changed files with 47 additions and 47 deletions
+1 -1
View File
@@ -904,7 +904,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
/* add new plugin to list */
new_plugin->prev_plugin = last_weechat_plugin;
new_plugin->next_plugin = NULL;
if (weechat_plugins)
if (last_weechat_plugin)
last_weechat_plugin->next_plugin = new_plugin;
else
weechat_plugins = new_plugin;