Index: Source/WebCore/html/parser/HTMLTreeBuilder.cpp |
=================================================================== |
--- Source/WebCore/html/parser/HTMLTreeBuilder.cpp (revision 116143) |
+++ Source/WebCore/html/parser/HTMLTreeBuilder.cpp (working copy) |
@@ -2204,7 +2204,7 @@ |
case InSelectMode: |
ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode); |
if (token.name() == optgroupTag) { |
- if (m_tree.currentNode()->hasTagName(optionTag) && m_tree.oneBelowTop()->hasTagName(optgroupTag)) |
+ if (m_tree.currentNode()->hasTagName(optionTag) && m_tree.oneBelowTop() && m_tree.oneBelowTop()->hasTagName(optgroupTag)) |
processFakeEndTag(optionTag); |
if (m_tree.currentNode()->hasTagName(optgroupTag)) { |
m_tree.openElements()->pop(); |