Index: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp |
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp |
index 88aac8c894d41a7bb24fc6bd2a5dc1f66eb28158..fc13b3dc783e4f69ca983d060e51a99e53679f67 100644 |
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp |
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp |
@@ -139,7 +139,12 @@ InjectedScript* V8InspectorSessionImpl::findInjectedScript(ErrorString* errorStr |
} |
const V8DebuggerImpl::ContextByIdMap* contexts = m_debugger->contextGroup(m_contextGroupId); |
- auto contextsIt = contexts ? contexts->find(contextId) : contexts->end(); |
+ if (!contexts) { |
+ *errorString = "Cannot find context with specified id"; |
+ return nullptr; |
+ } |
+ |
+ auto contextsIt = contexts->find(contextId); |
if (contextsIt == contexts->end()) { |
*errorString = "Cannot find context with specified id"; |
return nullptr; |