Abort early from ReorderFrames in case of an empty line frame, to avoid crashing later. bug=367015, r+sr=bzbarsky.

This commit is contained in:
uriber%gmail.com 2007-01-16 07:09:49 +00:00
Родитель 4a83314ad4
Коммит 9f346e2996
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -619,6 +619,8 @@ nsBidiPresUtils::ReorderFrames(nsPresContext* aPresContext,
// If this line consists of a line frame, reorder the line frame's children.
if (aFirstFrameOnLine->GetType() == nsGkAtoms::lineFrame) {
aFirstFrameOnLine = aFirstFrameOnLine->GetFirstChild(nsnull);
if (!aFirstFrameOnLine)
return;
// All children of the line frame are on the first line. Setting aNumFramesOnLine
// to -1 makes InitLogicalArrayFromLine look at all of them.
aNumFramesOnLine = -1;