summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-01-07 20:28:01 +0000
committernicm <nicm@openbsd.org>2010-01-07 20:28:01 +0000
commit20c3f86f0f21b1e6928162fd61b74954382daeb4 (patch)
treebb4393bfb41daa1df8f712a11fab19e6591914a6
parentMake sure to update p_cpu on MULTIPROCESSOR kernels. (diff)
downloadwireguard-openbsd-20c3f86f0f21b1e6928162fd61b74954382daeb4.tar.xz
wireguard-openbsd-20c3f86f0f21b1e6928162fd61b74954382daeb4.zip
Don't return the root cell if the string doesn't match.
-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);