aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-11-19 22:44:34 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-11-19 22:44:34 +0000
commit2d9c5cff789a81c2539ca0c95ea63be571a563b5 (patch)
tree37ad82d3b5b658449ef91c95b43d76f31832952d /gdb/completer.c
parentad82864c294f7d7aa3b61fd6b00a5fd7d870c69d (diff)
downloadgdb-2d9c5cff789a81c2539ca0c95ea63be571a563b5.zip
gdb-2d9c5cff789a81c2539ca0c95ea63be571a563b5.tar.gz
gdb-2d9c5cff789a81c2539ca0c95ea63be571a563b5.tar.bz2
* completer.c (complete_line_internal): Make sure the command
completer is not NULL before calling it.
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 02e9511..b14edaf 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -676,7 +676,7 @@ complete_line_internal (const char *text, char *line_buffer, int point,
p--)
;
}
- if (reason != handle_brkchars)
+ if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
}
}
@@ -747,7 +747,7 @@ complete_line_internal (const char *text, char *line_buffer, int point,
p--)
;
}
- if (reason != handle_brkchars)
+ if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
}
}