Bug 1359995: Add back the null-check on curData. r=heycam

I removed it, but seems it can be hit. It'd be nice to have a test-case where it
fails though...

MozReview-Commit-ID: 7Xa3dNHwFMn

--HG--
extra : rebase_source : 7f0d8df2f571b84745c41bf675f12a9340016775
This commit is contained in:
Emilio Cobos Álvarez 2017-04-27 00:26:40 +02:00
Родитель c43c229375
Коммит 2f08fea0a6
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -350,7 +350,9 @@ RestyleTracker::AddPendingRestyle(Element* aElement,
// to reach aElement in the case the PresShell posts a restyle event from
// PostRecreateFramesFor, so we need to track it here.
MOZ_ASSERT(curData, "expected to find a RestyleData for cur");
curData->mDescendants.AppendElement(aElement);
if (curData) {
curData->mDescendants.AppendElement(aElement);
}
}
}