From ac46e876851c2180566583084d85f2c5327f0ab6 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 7 Jan 2010 20:28:01 +0000 Subject: [PATCH] Don't return the root cell if the string doesn't match. --- layout-string.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout-string.c b/layout-string.c index acaf09e4..8955fd29 100644 --- a/layout-string.c +++ b/layout-string.c @@ -42,7 +42,9 @@ struct layout_cell *layout_find_bottomright(struct layout_cell *); struct layout_cell * layout_find_string(struct window *w, const char *s) { - struct layout_cell *lc = w->layout_root; + struct layout_cell *lc; + + lc = NULL; if (strcasecmp(s, "top") == 0) lc = layout_find_top(lc);