X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a17e237f4ada1196d7c0f0c23d4dface749c587a..37b8e6798782278fdfe4f3c1291aaff55cdbb8c9:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 4344e59772..35c9be54be 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -38,9 +38,7 @@ #include #endif -#if !USE_SHARED_LIBRARY IMPLEMENT_CLASS(wxPrinterDC, wxDC) -#endif // This form is deprecated wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation) @@ -249,12 +247,13 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset; lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset; lpszPortName = (LPSTR)lpDevNames + lpDevNames->wOutputOffset; - GlobalUnlock(pd.hDevNames); - GlobalFree(pd.hDevNames); - pd.hDevNames=NULL; deviceName = lpszDeviceName; portName = lpszPortName; + + GlobalUnlock(pd.hDevNames); + GlobalFree(pd.hDevNames); + pd.hDevNames=NULL; } if (pd.hDevMode)