summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-11-28 10:49:15 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-11-28 10:49:15 -0500
commit84680f7eef6d7f0a30213ceb6cc254a230eb5eab (patch)
tree4d78a40498c0e68c3a5d28f71d41e4ef6e55a803 /elaborate.cxx
parentbe7fd6299b45a46c9dc56bd6bd2ddb5b0afd9362 (diff)
downloadsystemtap-steved-84680f7eef6d7f0a30213ceb6cc254a230eb5eab.tar.gz
systemtap-steved-84680f7eef6d7f0a30213ceb6cc254a230eb5eab.tar.xz
systemtap-steved-84680f7eef6d7f0a30213ceb6cc254a230eb5eab.zip
PR6477: tolerate null token, e.g., from unwindsym warning message
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx4
1 files changed, 3 insertions, 1 deletions
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); }
}
}