mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Fixed a printing crashing bug in Update(),
This commit is contained in:
parent
e09312f5b2
commit
c81474e267
@ -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…
Reference in New Issue
Block a user