aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-setshow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 15c664d..4b01e62 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -96,6 +96,9 @@ deprecated_show_value_hack (struct ui_file *ignore_file,
struct cmd_list_element *c,
const char *value)
{
+ /* If there's no command or value, don't try to print it out. */
+ if (c == NULL || value == NULL)
+ return;
/* Print doc minus "show" at start. */
print_doc_line (gdb_stdout, c->doc + 5);
switch (c->var_type)