summaryrefslogtreecommitdiffstats
path: root/layout-string.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-01-08 16:25:50 +0000
committerTiago Cunha <tcunha@gmx.com>2010-01-08 16:25:50 +0000
commit4a6191c5d1a1bb7c05c1582d863b3ebe2469a3aa (patch)
tree987ce40300eeb22c4a1e5381392fd9c3f675a43b /layout-string.c
parent8212e762918c164b76554159c62a1efc7a29a38b (diff)
Sync OpenBSD patchset 602:
Don't return the root cell if the string doesn't match.
Diffstat (limited to 'layout-string.c')
-rw-r--r--layout-string.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/layout-string.c b/layout-string.c
index 50f2de71..63bfb00e 100644
--- a/layout-string.c
+++ b/layout-string.c
@@ -1,4 +1,4 @@
-/* $Id: layout-string.c,v 1.1 2009-12-10 16:52:58 tcunha Exp $ */
+/* $Id: layout-string.c,v 1.2 2010-01-08 16:25:50 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);