diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-29 16:36:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-29 16:36:56 +0000 |
commit | 8132b4d092838f1864d05b39b11986193731b967 (patch) | |
tree | dcd120185780e7d209940f80947eba2853cd3d0b /cmd-select-prompt.c | |
parent | 9e573367865976152784858003161c01dc80b83b (diff) | |
download | rtmux-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.c | 5 |
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); |