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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2736873006: Fix null pointer dereference in PLSA's scrollbarStyleSource. (Closed)
Patch Set: Created 3 years, 9 months 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/LayoutTests/fast/dom/shadow/img-display-contents-crash-expected.txt ('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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 8a5fd7f3bc135dc51d8b1fe6a2e3615ff0f209be..5bc91be15a091293cbb53dda4d4fd100aa2e06c1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1149,8 +1149,10 @@ static inline const LayoutObject& scrollbarStyleSource(
return layoutObject;
if (ShadowRoot* shadowRoot = node->containingShadowRoot()) {
- if (shadowRoot->type() == ShadowRootType::UserAgent)
- return *shadowRoot->host().layoutObject();
+ if (shadowRoot->type() == ShadowRootType::UserAgent) {
+ if (LayoutObject* hostLayoutObject = shadowRoot->host().layoutObject())
+ return *hostLayoutObject;
+ }
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/img-display-contents-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698