aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/CallEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Core/CallEvent.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/CallEvent.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp
index 3b9e1e1979..fb00a226a2 100644
--- a/lib/StaticAnalyzer/Core/CallEvent.cpp
+++ b/lib/StaticAnalyzer/Core/CallEvent.cpp
@@ -681,6 +681,9 @@ const Decl *ObjCMethodCall::getRuntimeDefinition() const {
ReceiverT = cast<ObjCObjectPointerType>(SupersType.getTypePtr());
} else {
const MemRegion *Receiver = getReceiverSVal().getAsRegion();
+ if (!Receiver)
+ return 0;
+
DynamicTypeInfo TI = getState()->getDynamicTypeInfo(Receiver);
ReceiverT = dyn_cast<ObjCObjectPointerType>(TI.getType().getTypePtr());
}