зеркало из https://github.com/mozilla/gecko-dev.git
Bug 417351: (Linux only) Initialize nsDeviceContextSpecGTK member data to null, fixing crash in destructor when cancelling printing. r+sr=roc, a=blocking1.9+
This commit is contained in:
Родитель
c545189a81
Коммит
b05af4d0c6
|
@ -386,6 +386,8 @@ nsStringArray* GlobalPrinters::mGlobalPrinterList = nsnull;
|
||||||
nsDeviceContextSpecGTK::nsDeviceContextSpecGTK()
|
nsDeviceContextSpecGTK::nsDeviceContextSpecGTK()
|
||||||
{
|
{
|
||||||
DO_PR_DEBUG_LOG(("nsDeviceContextSpecGTK::nsDeviceContextSpecGTK()\n"));
|
DO_PR_DEBUG_LOG(("nsDeviceContextSpecGTK::nsDeviceContextSpecGTK()\n"));
|
||||||
|
mGtkPageSetup = nsnull;
|
||||||
|
mGtkPrintSettings = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDeviceContextSpecGTK::~nsDeviceContextSpecGTK()
|
nsDeviceContextSpecGTK::~nsDeviceContextSpecGTK()
|
||||||
|
@ -394,12 +396,10 @@ nsDeviceContextSpecGTK::~nsDeviceContextSpecGTK()
|
||||||
|
|
||||||
if (mGtkPageSetup) {
|
if (mGtkPageSetup) {
|
||||||
g_object_unref(mGtkPageSetup);
|
g_object_unref(mGtkPageSetup);
|
||||||
mGtkPageSetup = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mGtkPrintSettings) {
|
if (mGtkPrintSettings) {
|
||||||
g_object_unref(mGtkPrintSettings);
|
g_object_unref(mGtkPrintSettings);
|
||||||
mGtkPrintSettings = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -706,7 +706,7 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::BeginDocument(PRUnichar * aTitle, PRUnicha
|
||||||
NS_IMETHODIMP nsDeviceContextSpecGTK::EndDocument()
|
NS_IMETHODIMP nsDeviceContextSpecGTK::EndDocument()
|
||||||
{
|
{
|
||||||
if (mToPrinter) {
|
if (mToPrinter) {
|
||||||
if (!gtk_print_job_set_source_file(mPrintJob, mSpoolName.get(), NULL))
|
if (!gtk_print_job_set_source_file(mPrintJob, mSpoolName.get(), nsnull))
|
||||||
return NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE;
|
return NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE;
|
||||||
|
|
||||||
NS_ADDREF(mSpoolFile.get());
|
NS_ADDREF(mSpoolFile.get());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче