diff --git a/layout/base/RestyleTracker.h b/layout/base/RestyleTracker.h index c1d59a1cf7e2..42c7d390b4ff 100644 --- a/layout/base/RestyleTracker.h +++ b/layout/base/RestyleTracker.h @@ -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); } }