From: Ted Kremenek Date: Fri, 18 Apr 2008 02:24:50 +0000 (+0000) Subject: Added null check. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=329d2cc85919acd730e04429bcac112736cd4356;p=clang Added null check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49887 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 294eb5faac..743f44bb32 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -359,6 +359,9 @@ void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, bool BugReporter::IsCached(ExplodedNode* 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.