diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | elaborate.cxx | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2008-11-28 Frank Ch. Eigler <fche@elastic.org> + + PR 6477. + * elaborate.cxx (print_error_source, print_warning): Tolerate + NULL token. + 2008-11-27 Frank Ch. Eigler <fche@elastic.org> PR 7036 diff --git a/elaborate.cxx b/elaborate.cxx index 0dd80626..84866c35 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1498,6 +1498,8 @@ systemtap_session::print_error_source (std::ostream& message, unsigned line = tok->location.line; unsigned col = tok->location.column; string file_contents; + + assert (tok); if (tok->location.stap_file) file_contents = tok->location.stap_file->file_contents; else @@ -1535,7 +1537,7 @@ systemtap_session::print_warning (const string& message_str, const token* tok) clog << "WARNING: " << message_str; if (tok) { clog << ": "; print_token (clog, tok); } clog << endl; - print_error_source (clog, align_warning, tok); + if (tok) { print_error_source (clog, align_warning, tok); } } } |