summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-03 23:02:28 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-03 23:02:28 +0100
commitd4177e954c8433469f5ac4cade15bafb1675117e (patch)
tree76ff287b770ec8e217c6839e0afae2a7dd716961 /cfg.c
parent4d505574dc515d6e554b3f37e9aa5bdb8930c6cb (diff)
parent45ae9a8e3520d73c795bb993ced4fe43d06ad6f1 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cfg.c b/cfg.c
index 60735046..86b4c82f 100644
--- a/cfg.c
+++ b/cfg.c
@@ -301,9 +301,10 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int quiet)
free(buf);
new_item = cmdq_get_command(cmdlist, NULL, NULL, 0);
- if (item != NULL)
+ if (item != NULL) {
cmdq_insert_after(item, new_item);
- else
+ item = new_item;
+ } else
cmdq_append(c, new_item);
cmd_list_free(cmdlist);