mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13: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:
@@ -136,7 +136,7 @@ exec_add ()
|
||||
|
||||
new_exec_cmd->prev_cmd = last_exec_cmd;
|
||||
new_exec_cmd->next_cmd = NULL;
|
||||
if (exec_cmds)
|
||||
if (last_exec_cmd)
|
||||
last_exec_cmd->next_cmd = new_exec_cmd;
|
||||
else
|
||||
exec_cmds = new_exec_cmd;
|
||||
|
||||
Reference in New Issue
Block a user