diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 415ad0617812..0b414e7ed37e 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -1008,8 +1008,10 @@ public: void AppendToBottom(nsDisplayList* aList) { if (aList->mSentinel.mAbove) { aList->mTop->mAbove = mSentinel.mAbove; - mTop = aList->mTop; mSentinel.mAbove = aList->mSentinel.mAbove; + if (mTop == &mSentinel) { + mTop = aList->mTop; + } aList->mTop = &aList->mSentinel; aList->mSentinel.mAbove = nsnull;