]> granicus.if.org Git - clang/commitdiff
Added null check.
authorTed Kremenek <kremenek@apple.com>
Fri, 18 Apr 2008 02:24:50 +0000 (02:24 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 18 Apr 2008 02:24:50 +0000 (02:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49887 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index 294eb5faac3c19b307acb6e8b6eb03d02a11328b..743f44bb326b85e5bae07f127a437e7e7e6e3573 100644 (file)
@@ -359,6 +359,9 @@ void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
 
 bool BugReporter::IsCached(ExplodedNode<ValueState>* N) {
   
+  if (!N)
+    return false;
+  
   // HACK: Cache the location of the error.  Don't emit the same
   // warning for the same error type that occurs at the same program
   // location but along a different path.