mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 370024 - Nullcheck mPrintingSurface in EndDocument to prevent crashing when printing
p=cbarrett@mozilla.com (Colin Barrett) r+sr=pavlov@pavlov.net (Stuart Parmenter)
This commit is contained in:
parent
08cc168e07
commit
d94594b5d3
@ -509,9 +509,10 @@ nsThebesDeviceContext::BeginDocument(PRUnichar* aTitle,
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsThebesDeviceContext::EndDocument(void)
|
nsThebesDeviceContext::EndDocument(void)
|
||||||
{
|
{
|
||||||
|
if (mPrintingSurface) {
|
||||||
mPrintingSurface->EndPrinting();
|
mPrintingSurface->EndPrinting();
|
||||||
mPrintingSurface->Finish();
|
mPrintingSurface->Finish();
|
||||||
|
}
|
||||||
if (mDeviceContextSpec)
|
if (mDeviceContextSpec)
|
||||||
mDeviceContextSpec->EndDocument();
|
mDeviceContextSpec->EndDocument();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user