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

Unified Diff: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp

Issue 2552163002: Fix crash when referencing a registered non-inherited custom property (Closed)
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
index 219ea54eb84c380de3b72dd9f5ea375be35acc8c..15835b956b9762884ffa6dfcc95464c345f11b4e 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
@@ -53,7 +53,8 @@ CSSVariableData* CSSVariableResolver::valueForCustomProperty(
if (m_inheritedVariables)
variableData = m_inheritedVariables->getVariable(name);
} else {
- variableData = m_nonInheritedVariables->getVariable(name);
+ if (m_nonInheritedVariables)
+ variableData = m_nonInheritedVariables->getVariable(name);
}
if (!variableData)
return registration ? registration->initialVariableData() : nullptr;

Powered by Google App Engine
This is Rietveld 408576698