зеркало из https://github.com/mozilla/pjs.git
Added a check for a NULL nsIDeviceContextSpec. This happens when the user "cancels"
out of the print dialog.
This commit is contained in:
Родитель
52fbea657c
Коммит
7a0b390237
|
@ -458,6 +458,7 @@ NS_IMETHODIMP DocumentViewerImpl :: Print(void)
|
||||||
|
|
||||||
factory->CreateDeviceContextSpec(nsnull, devspec, PR_FALSE);
|
factory->CreateDeviceContextSpec(nsnull, devspec, PR_FALSE);
|
||||||
|
|
||||||
|
if (nsnull != devspec) {
|
||||||
dx = mPresContext->GetDeviceContext();
|
dx = mPresContext->GetDeviceContext();
|
||||||
|
|
||||||
if (NS_OK == dx->GetDeviceContextFor(devspec, newdx))
|
if (NS_OK == dx->GetDeviceContextFor(devspec, newdx))
|
||||||
|
@ -531,6 +532,7 @@ NS_IMETHODIMP DocumentViewerImpl :: Print(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_RELEASE(dx);
|
NS_RELEASE(dx);
|
||||||
|
}
|
||||||
NS_RELEASE(factory);
|
NS_RELEASE(factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче