зеркало из https://github.com/mozilla/gecko-dev.git
Fix null pointer bugs (35785 and nonfiled), fixes editor bug 35885. r=evaughan
This commit is contained in:
Родитель
71eac1e422
Коммит
48f67d5e5a
|
@ -1477,6 +1477,8 @@ nsMenuFrame::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize)
|
|||
if (!frame) {
|
||||
MarkAsGenerated();
|
||||
frame = mPopupFrames.FirstChild();
|
||||
// No child - just return
|
||||
if (!frame) return NS_OK;
|
||||
}
|
||||
|
||||
nsIBox* ibox = nsnull;
|
||||
|
|
|
@ -147,21 +147,22 @@ nsTempleLayout::BuildBoxSizeList(nsIBox* aBox, nsBoxLayoutState& aState, nsBoxSi
|
|||
while(box) {
|
||||
nsIMonument* monument = nsnull;
|
||||
box->GetLayoutManager(getter_AddRefs(layout));
|
||||
layout->QueryInterface(NS_GET_IID(nsIMonument), (void**)&monument);
|
||||
|
||||
if (monument)
|
||||
monument->BuildBoxSizeList(box, aState, first, last);
|
||||
else {
|
||||
nsMonumentLayout::BuildBoxSizeList(box, aState, first, last);
|
||||
first->bogus = PR_TRUE;
|
||||
|
||||
if (layout) {
|
||||
layout->QueryInterface(NS_GET_IID(nsIMonument), (void**)&monument);
|
||||
if (monument)
|
||||
monument->BuildBoxSizeList(box, aState, first, last);
|
||||
else {
|
||||
nsMonumentLayout::BuildBoxSizeList(box, aState, first, last);
|
||||
first->bogus = PR_TRUE;
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
aFirst = first;
|
||||
else
|
||||
(aLast)->next = first;
|
||||
aLast = last;
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
aFirst = first;
|
||||
else
|
||||
(aLast)->next = first;
|
||||
|
||||
aLast = last;
|
||||
|
||||
box->GetNextBox(&box);
|
||||
count++;
|
||||
|
|
Загрузка…
Ссылка в новой задаче