From: Chris Lattner Date: Fri, 16 Jan 2009 19:01:46 +0000 (+0000) Subject: only notify callbacks if they exist. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=172e336b12fa32a1737f66d77a3f2de86f9cc8e8;p=clang only notify callbacks if they exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62334 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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); }