Add null pointer check.
llvm-svn: 68281
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 5047e71..7637a16 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/lib/Analysis/BugReporter.cpp
@@ -789,7 +789,8 @@
if (const Stmt *PS = PrevLoc.asStmt())
if (const Stmt *NS = NewLoc.asStmt()) {
const Stmt *parentPS = PDB.getParent(PS);
- if (isa<CompoundStmt>(parentPS) && parentPS == PDB.getParent(NS))
+ if (parentPS && isa<CompoundStmt>(parentPS) &&
+ parentPS == PDB.getParent(NS))
return;
}