forked from Imagelibrary/binutils-gdb
* gdbtk.c (tk_command): Catch case where no argument is given
since this will cause the tcl interpreter to dump core.
This commit is contained in:
@@ -1009,6 +1009,10 @@ tk_command (cmd, from_tty)
|
||||
char *result;
|
||||
struct cleanup *old_chain;
|
||||
|
||||
/* Catch case of no argument, since this will make the tcl interpreter dump core. */
|
||||
if (cmd == NULL)
|
||||
error_no_arg ("tcl command to interpret");
|
||||
|
||||
retval = Tcl_Eval (interp, cmd);
|
||||
|
||||
result = strdup (interp->result);
|
||||
|
||||
Reference in New Issue
Block a user