fs_cli: fix segfault if a pressed function key is not bound
This commit is contained in:
parent
712853d900
commit
cbe8b9d55d
|
@ -100,12 +100,12 @@ static unsigned char console_fnkey_pressed(int i)
|
||||||
{
|
{
|
||||||
const char *c;
|
const char *c;
|
||||||
assert((i > 0) && (i <= 12));
|
assert((i > 0) && (i <= 12));
|
||||||
c = global_profile->console_fnkeys[i - 1];
|
if (!(c = global_profile->console_fnkeys[i - 1])) {
|
||||||
printf("%s\n", c);
|
printf("\n");
|
||||||
if (c == NULL) {
|
|
||||||
esl_log(ESL_LOG_ERROR, "FUNCTION KEY F%d IS NOT BOUND, please edit your config.\n", i);
|
esl_log(ESL_LOG_ERROR, "FUNCTION KEY F%d IS NOT BOUND, please edit your config.\n", i);
|
||||||
return CC_REDISPLAY;
|
return CC_REDISPLAY;
|
||||||
}
|
}
|
||||||
|
printf("%s\n", c);
|
||||||
if (process_command(global_handle, c)) {
|
if (process_command(global_handle, c)) {
|
||||||
running = thread_running = 0;
|
running = thread_running = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue