Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp

Issue 2484903002: DevTools: fix a crash in stopRuleUsageTracking (Closed)
Patch Set: stopRuleUsageTracking crash fixed Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
index 491ab7414c84af364cb6200d647ba57e4337da58..0f73dc24b68fd28ca4c634a63e3a82e6062938df 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1609,6 +1609,9 @@ InspectorStyleSheet::buildObjectForRuleUsage(CSSRule* rule, bool wasUsed) {
CSSRuleSourceData* sourceData = sourceDataForRule(rule);
+ if (!sourceData)
+ return nullptr;
+
std::unique_ptr<protocol::CSS::RuleUsage> result =
protocol::CSS::RuleUsage::create()
.setStyleSheetId(id())
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698