Bug 1133104, null check parent node before checking whether it is <picture>, r=bz

This commit is contained in:
Olli Pettay 2015-02-14 13:02:47 +02:00
parent b12fcdab7c
commit d5275b4cf7

View File

@ -629,8 +629,8 @@ HTMLImageElement::UnbindFromTree(bool aDeep, bool aNullParent)
}
}
if (aNullParent &&
nsINode::GetParentNode()->Tag() == nsGkAtoms::picture &&
if (aNullParent && GetParent() &&
GetParent()->IsHTML(nsGkAtoms::picture) &&
HTMLPictureElement::IsPictureEnabled()) {
// Being removed from picture re-triggers selection, even if we
// weren't using a <source> peer