Put the null-check *before* the crash it's supposed to prevent (which timeless saw, somehow).
git-svn-id: svn://10.0.0.236/trunk@168616 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c1e56cf542
commit
16f4991e84
@ -2120,12 +2120,14 @@ nsTextControlFrame::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize)
|
||||
|
||||
nsPresContext* presContext = aState.PresContext();
|
||||
const nsHTMLReflowState* reflowState = aState.GetReflowState();
|
||||
nsSize styleSize(CSS_NOTSET,CSS_NOTSET);
|
||||
nsFormControlFrame::GetStyleSize(presContext, *reflowState, styleSize);
|
||||
|
||||
// XXXldb Is there a good reason to think this is both non-null and the
|
||||
// correct reflow state?
|
||||
if (!reflowState)
|
||||
return NS_OK;
|
||||
|
||||
nsSize styleSize(CSS_NOTSET,CSS_NOTSET);
|
||||
nsFormControlFrame::GetStyleSize(presContext, *reflowState, styleSize);
|
||||
|
||||
if (mState & NS_FRAME_FIRST_REFLOW)
|
||||
mNotifyOnInput = PR_TRUE; //its ok to notify now. all has been prepared.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user