summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-01-07 20:28:02 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-01-07 20:28:02 +0000
commit7938c0a78556df7b2886a762b513def3f1d6fc30 (patch)
treea0a70986f0a80155585905eecca29ecf6f2e7019 /usr.bin/tmux
parent9f156fceafd219cc5994330c14e3c608ec86eebb (diff)
Don't return the root cell if the string doesn't match.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/layout-string.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/layout-string.c b/usr.bin/tmux/layout-string.c
index 4392e5cecc7..3c18d22a6aa 100644
--- a/usr.bin/tmux/layout-string.c
+++ b/usr.bin/tmux/layout-string.c
@@ -1,4 +1,4 @@
-/* $Id: layout-string.c,v 1.1 2009/12/08 07:49:31 nicm Exp $ */
+/* $Id: layout-string.c,v 1.2 2010/01/07 20:28:01 nicm 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);