Skip to content

Commit

Permalink
Bug 564079. Check that we have a parent before checking whether it's …
Browse files Browse the repository at this point in the history
…an Element. r=peterv
  • Loading branch information
bzbarsky committed May 6, 2010
1 parent 09691f1 commit 490ac49
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions content/base/crashtests/564079-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">

document.createTextNode("x").lookupPrefix("");

</script>
</head>
</html>
1 change: 1 addition & 0 deletions content/base/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ load 529670.html
load 554230-1.xhtml
load 552651.html
load 558973.html
load 564079-1.html
2 changes: 1 addition & 1 deletion content/base/src/nsGenericDOMDataNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class nsGenericDOMDataNode : public nsIContent
{
nsINode *parent = GetNodeParent();

return parent->IsElement() ? parent->AsElement() : nsnull;
return parent && parent->IsElement() ? parent->AsElement() : nsnull;
}

/**
Expand Down

0 comments on commit 490ac49

Please sign in to comment.