]> granicus.if.org Git - clang/commitdiff
only notify callbacks if they exist.
authorChris Lattner <sabre@nondot.org>
Fri, 16 Jan 2009 19:01:46 +0000 (19:01 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 16 Jan 2009 19:01:46 +0000 (19:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62334 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Pragma.cpp

index 60877743531d3c857d1b673825d059105db27b6a..667e4361a839fbf32a6991e3dc90b5ea7e40a111 100644 (file)
@@ -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);
 }