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:
dcone%netscape.com
1998-12-11 16:05:54 +00:00
parent 1bd5ea0c99
commit a1329a49b0

View File

@@ -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;