ref: d9e5685ee0dad00198fa1792c5666ea782848553
parent: db0af510f00edfee776a0c68f36a245830d00c06
author: Sigrid Haflínudóttir <[email protected]>
date: Tue Jan 14 20:34:36 EST 2020
cfg: fix a crash in a dir with no children
--- a/cfg/cfg.c
+++ b/cfg/cfg.c
@@ -308,6 +308,9 @@
ui = newui(path);
top[numtop++] = ui;
for (i = 0; i < ui->numchild; i++) {
+ if (ui->child[i]->numchild < 1)
+ continue;
+
ch = ui->child[i]->child[0];
ch->win = w = calloc(1, sizeof(*w));