aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r--lib/Lex/Pragma.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp
index 6087774353..667e4361a8 100644
--- a/lib/Lex/Pragma.cpp
+++ b/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);
}