Bug 1098270 - Null check curData in AddPendingRestyle to avoid crashing on style sheet updates in ShadowRoots outside of the composed document. r=dbaron

This commit is contained in:
Cameron McCormack 2014-11-27 09:47:52 +11:00
parent 802419946a
commit 020845735c

View File

@ -482,7 +482,7 @@ RestyleTracker::AddPendingRestyle(Element* aElement,
// If cur has an eRestyle_ForceDescendants restyle hint, then we
// know that we will get to all descendants. Don't bother
// recording the descendant to restyle in that case.
if (!(curData->mRestyleHint & eRestyle_ForceDescendants)) {
if (curData && !(curData->mRestyleHint & eRestyle_ForceDescendants)) {
curData->mDescendants.AppendElement(aElement);
}
}