diff --git a/main.c b/main.c index 7708f56..67b4456 100644 --- a/main.c +++ b/main.c @@ -998,11 +998,9 @@ read_dirs (char *path, bool low, struct ovl_layer *layers) l->low = low; if (low) { + l->next = NULL; if (last == NULL) - { - last = layers = l; - l->next = NULL; - } + last = layers = l; else { last->next = l;