mirror of https://github.com/tmux/tmux.git
Do not crash if there is no item to show command error, from Anindya
Mukherjee.pull/2614/head
parent
e8224fb0d1
commit
9017af2355
|
@ -20,6 +20,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -190,8 +191,12 @@ cmd_run_shell_timer(__unused int fd, __unused short events, void* arg)
|
||||||
&error);
|
&error);
|
||||||
}
|
}
|
||||||
if (status == CMD_PARSE_ERROR) {
|
if (status == CMD_PARSE_ERROR) {
|
||||||
cmdq_error(cdata->item, "%s", error);
|
if (cdata->item == NULL) {
|
||||||
free(error);
|
*error = toupper((u_char)*error);
|
||||||
|
status_message_set(c, -1, 1, "%s", error);
|
||||||
|
} else
|
||||||
|
cmdq_error(cdata->item, "%s", error);
|
||||||
|
free(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue