Chromium Code Reviews| Index: Source/core/css/RuleSet.cpp |
| diff --git a/Source/core/css/RuleSet.cpp b/Source/core/css/RuleSet.cpp |
| index fefc1e4310b1aa9006b8ffcfa65737dd361a0a0b..0f452c9b46e783ea771523386f78a0e847cf8bb1 100644 |
| --- a/Source/core/css/RuleSet.cpp |
| +++ b/Source/core/css/RuleSet.cpp |
| @@ -177,10 +177,11 @@ bool RuleSet::findBestRuleSetAndAdd(const CSSSelector& component, RuleData& rule |
| #endif |
| const CSSSelector* it = &component; |
| - for (; it->relation() == CSSSelector::SubSelector; it = it->tagHistory()) { |
| + for (; it && it->relation() == CSSSelector::SubSelector; it = it->tagHistory()) { |
| extractValuesforSelector(it, id, className, customPseudoElementName, tagName); |
| } |
| - extractValuesforSelector(it, id, className, customPseudoElementName, tagName); |
| + if (it) |
|
ojan
2014/04/01 21:20:50
This makes me sad. I'm OK with the patch to fix th
chrishtr
2014/04/01 21:27:58
Done.
|
| + extractValuesforSelector(it, id, className, customPseudoElementName, tagName); |
| // Prefer rule sets in order of most likely to apply infrequently. |
| if (!id.isEmpty()) { |