mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +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)
|
||||||
{
|
{
|
||||||
mPrintingSurface->EndPrinting();
|
if (mPrintingSurface) {
|
||||||
mPrintingSurface->Finish();
|
mPrintingSurface->EndPrinting();
|
||||||
|
mPrintingSurface->Finish();
|
||||||
|
}
|
||||||
if (mDeviceContextSpec)
|
if (mDeviceContextSpec)
|
||||||
mDeviceContextSpec->EndDocument();
|
mDeviceContextSpec->EndDocument();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user