Fix crash bug 282707. Patch by Mats Palmgren <mats.palmgren@bredband.net>, r+sr=bzbarsky

This commit is contained in:
bzbarsky%mit.edu 2005-12-08 19:01:20 +00:00
parent 0e1d9f3154
commit 88a01f50af

View File

@ -2252,14 +2252,12 @@ nsComboboxControlFrame::SetInitialChildList(nsPresContext* aPresContext,
child = child->GetNextSibling()) {
nsIFormControlFrame* fcFrame = nsnull;
CallQueryInterface(child, &fcFrame);
if (fcFrame) {
if (fcFrame->GetFormControlType() == NS_FORM_INPUT_BUTTON) {
mButtonFrame = child;
}
} else {
mDisplayFrame = child;
if (fcFrame && fcFrame->GetFormControlType() == NS_FORM_INPUT_BUTTON) {
mButtonFrame = child;
break;
}
}
NS_ASSERTION(mButtonFrame, "missing button frame in initial child list");
}
return rv;
}