X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3168b4c3ae31dc190dbf02b40a7ee1b9353b6e43..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/msw/printdlg.cpp?ds=sidebyside diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index c64b054463..378044bb5e 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -152,9 +152,10 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data ) HGLOBAL hDevNames = (HGLOBAL)(DWORD) m_devNames; if (!hDevMode) + { return false; - - if ( hDevMode ) + } + else { LPDEVMODE devMode = (LPDEVMODE)GlobalLock(hDevMode); @@ -221,7 +222,7 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data ) data.SetPaperId( wxPAPER_NONE ); data.SetPaperSize( wxSize(0,0) ); m_customWindowsPaperId = 0; - + GlobalUnlock(hDevMode); return false; }