aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/top.c b/gdb/top.c
index e41f56c..55e4504 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -470,7 +470,8 @@ execute_command (char *p, int from_tty)
if (c->flags & DEPRECATED_WARN_USER)
deprecated_cmd_warning (&line);
- if (c->class == class_user)
+ /* c->user_commands would be NULL in the case of a python command. */
+ if (c->class == class_user && c->user_commands)
execute_user_command (c, arg);
else if (c->type == set_cmd || c->type == show_cmd)
do_setshow_command (arg, from_tty, c);