summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/Pragma.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 60877743531..667e4361a83 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -400,7 +400,8 @@ void Preprocessor::HandlePragmaComment(Token &Tok) {
}
// If the pragma is lexically sound, notify any interested PPCallbacks.
- Callbacks->PragmaComment(CommentLoc, II, ArgumentString);
+ if (Callbacks)
+ Callbacks->PragmaComment(CommentLoc, II, ArgumentString);
}
OpenPOWER on IntegriCloud