Index: Source/WebCore/inspector/InspectorDOMAgent.cpp |
=================================================================== |
--- Source/WebCore/inspector/InspectorDOMAgent.cpp (revision 90016) |
+++ Source/WebCore/inspector/InspectorDOMAgent.cpp (working copy) |
@@ -589,7 +589,13 @@ |
return; |
} |
- const NamedNodeMap* attrMap = toHTMLElement(parsedElement->firstChild())->attributes(true); |
+ Node* child = parsedElement->firstChild(); |
+ if (!child) { |
+ *errorString = "Could not parse value as attributes."; |
+ return; |
+ } |
+ |
+ const NamedNodeMap* attrMap = toHTMLElement(child)->attributes(true); |
if (!attrMap) { |
element->removeAttribute(name, ec); |
if (ec) |