Fixed a printing crashing bug in Update(),
Now check to make sure mWindowPtr is not null. git-svn-id: svn://10.0.0.236/trunk@32531 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
eb1f2f4ddc
commit
d70cff6cc5
@ -760,7 +760,7 @@ PRBool nsWindow::OnPaint(nsPaintEvent &event)
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsWindow::Update()
|
||||
{
|
||||
if (! mVisible)
|
||||
if (! mVisible || !mWindowPtr)
|
||||
return NS_OK;
|
||||
|
||||
static PRBool reentrant = PR_FALSE;
|
||||
@ -778,7 +778,8 @@ NS_IMETHODIMP nsWindow::Update()
|
||||
#if TARGET_CARBON
|
||||
::GetWindowRegion(mWindowPtr, kWindowUpdateRgn, saveUpdateRgn);
|
||||
#else
|
||||
::CopyRgn(((WindowRecord*)mWindowPtr)->updateRgn, saveUpdateRgn);
|
||||
if(mWindowPtr)
|
||||
::CopyRgn(((WindowRecord*)mWindowPtr)->updateRgn, saveUpdateRgn);
|
||||
#endif
|
||||
|
||||
// draw the widget
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user