summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jtag/tcl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 71efc8b5..b86e006a 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -422,7 +422,8 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
Jim_WrongNumArgs(goi.interp, 1, goi.argv-1, "(no params)");
return JIM_ERR;
}
- Jim_SetResultString(goi.interp, jtag_interface->name, -1);
+ const char *name = jtag_interface ? jtag_interface->name : NULL;
+ Jim_SetResultString(goi.interp, name ? : "undefined", -1);
return JIM_OK;
case JTAG_CMD_INIT:
if (goi.argc != 0) {