diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-02 03:30:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-02 03:30:55 +0000 |
commit | 28de78bf9b8532b7733f49aea54b7fae651af490 (patch) | |
tree | 87cf317757f23f037c904ae3f6206f8d302a3ffc /lib/Analysis/BugReporter.cpp | |
parent | 17c35acad1248ec919e76992c03b47d848502a15 (diff) |
Add null pointer check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 5047e71804..7637a1614c 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -789,7 +789,8 @@ static void GenExtAddEdge(PathDiagnostic& PD, 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; } |