From: Joel Brobecker Date: Thu, 19 Nov 2009 22:44:34 +0000 (+0000) Subject: * completer.c (complete_line_internal): Make sure the command X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d9c5cff789a81c2539ca0c95ea63be571a563b5;p=binutils-gdb.git * completer.c (complete_line_internal): Make sure the command completer is not NULL before calling it. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4f89bc9d78a..6ff3c3d5724 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-11-19 Joel Brobecker + + * completer.c (complete_line_internal): Make sure the command + completer is not NULL before calling it. + 2009-11-19 Jerome Guitton * ada-lang.c (packed_array_type): Rename to... diff --git a/gdb/completer.c b/gdb/completer.c index 02e95110114..b14edafbeef 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); } }