Fixed it so that a control handle is not made unless a valid windowptr is passed in. This is needed for the printer port.
git-svn-id: svn://10.0.0.236/trunk@16249 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -38,10 +38,10 @@ nsMacControl::nsMacControl() : nsWindow()
|
||||
mLastHilite = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
/**-------------------------------------------------------------------------
|
||||
* See documentation in nsMacControl.h
|
||||
* @update -- 12/10/98 dwc
|
||||
*/
|
||||
NS_IMETHODIMP nsMacControl::Create(nsIWidget *aParent,
|
||||
const nsRect &aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
@@ -59,8 +59,9 @@ NS_IMETHODIMP nsMacControl::Create(nsIWidget *aParent,
|
||||
ctlRect.x = ctlRect.y = 0;
|
||||
Rect macRect;
|
||||
nsRectToMacRect(ctlRect, macRect);
|
||||
mControl = ::NewControl(mWindowPtr, &macRect, "\p", true, 0, 0, 1, mControlType, nil);
|
||||
|
||||
if(nsnull != mWindowPtr){
|
||||
mControl = ::NewControl(mWindowPtr, &macRect, "\p", true, 0, 0, 1, mControlType, nil);
|
||||
}
|
||||
mLastBounds = ctlRect;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user