mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Handle NULL properly.
This commit is contained in:
parent
9e57336786
commit
8132b4d092
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user