Index: Source/core/dom/DocumentOrderedMap.cpp |
diff --git a/Source/core/dom/DocumentOrderedMap.cpp b/Source/core/dom/DocumentOrderedMap.cpp |
index eb155a8906a46fd560fd22e188626b2e2450f91e..494d266768f241b113a78fb0a0392cc89a72707b 100644 |
--- a/Source/core/dom/DocumentOrderedMap.cpp |
+++ b/Source/core/dom/DocumentOrderedMap.cpp |
@@ -122,7 +122,8 @@ inline Element* DocumentOrderedMap::get(StringImpl* key, const TreeScope* scope) |
if (m_duplicateCounts.contains(key)) { |
// We know there's at least one node that matches; iterate to find the first one. |
- for (element = ElementTraversal::firstWithin(scope->rootNode()); element; element = ElementTraversal::next(*element)) { |
+ ASSERT(scope->rootNode()); |
+ for (element = ElementTraversal::firstWithin(*scope->rootNode()); element; element = ElementTraversal::next(*element)) { |
if (!keyMatches(key, element)) |
continue; |
m_duplicateCounts.remove(key); |