aboutsummaryrefslogtreecommitdiff
path: root/cmd-select-prompt.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-09-29 16:36:56 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-09-29 16:36:56 +0000
commit8132b4d092838f1864d05b39b11986193731b967 (patch)
treedcd120185780e7d209940f80947eba2853cd3d0b /cmd-select-prompt.c
parent9e573367865976152784858003161c01dc80b83b (diff)
downloadrtmux-8132b4d092838f1864d05b39b11986193731b967.tar.gz
rtmux-8132b4d092838f1864d05b39b11986193731b967.tar.bz2
rtmux-8132b4d092838f1864d05b39b11986193731b967.zip
Handle NULL properly.
Diffstat (limited to 'cmd-select-prompt.c')
-rw-r--r--cmd-select-prompt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-select-prompt.c b/cmd-select-prompt.c
index bbfba57d..e252ef88 100644
--- a/cmd-select-prompt.c
+++ b/cmd-select-prompt.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-select-prompt.c,v 1.2 2008-06-25 20:44:26 nicm Exp $ */
+/* $Id: cmd-select-prompt.c,v 1.3 2008-09-29 16:36:56 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -70,6 +70,9 @@ cmd_select_prompt_callback(void *data, char *s)
char msg[128];
u_int idx;
+ if (s == NULL)
+ return;
+
idx = strtonum(s, 0, UINT_MAX, &errstr);
if (errstr != NULL) {
xsnprintf(msg, sizeof msg, "Index %s: %s", errstr, s);