mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Fix null pointer bugs (35785 and nonfiled), fixes editor bug 35885. r=evaughan
This commit is contained in:
parent
71eac1e422
commit
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++;
|
||||
|
Loading…
Reference in New Issue
Block a user