diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index e889ca81c54..f89aa72c1be 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -723,6 +723,9 @@ nsSubDocumentFrame::AttributeChanged(PRInt32 aNameSpaceID, nsCOMPtr parentItem; docShellAsItem->GetParent(getter_AddRefs(parentItem)); + if (!parentItem) { + return NS_OK; + } PRInt32 parentType; parentItem->GetItemType(&parentType);