summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-06-30 13:40:31 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-06-30 13:40:31 +0000
commitd267c41883fe3d9f1690b43fd89aa1a084358779 (patch)
treeab6b473be2fb314e38fdba6079d481794e26eb5c /usr.bin/tmux
parent4c5fd7208e41155908077f94248f6873b3169c5b (diff)
When unlocking the server, don't try to clear the prompt on clients without a
prompt (such as the one issuing the unlock request). This caused the server to die if the wrong password was entered when unlocking from the command line with -U (nasty).
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/server-fn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c
index 9449842a544..e6003d98607 100644
--- a/usr.bin/tmux/server-fn.c
+++ b/usr.bin/tmux/server-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.2 2009/06/25 06:15:04 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.3 2009/06/30 13:40:30 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -214,7 +214,7 @@ server_unlock(const char *s)
wrong:
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
c = ARRAY_ITEM(&clients, i);
- if (c == NULL)
+ if (c == NULL || c->prompt_buffer == NULL)
continue;
*c->prompt_buffer = '\0';