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
Родитель 7ebde708bb
Коммит fdaf162ad8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);
}
}