X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84968677abe36133a45e0426c2a365da18851f90..76d81b4d11617b806d6ab9bd60614c39999cdece:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index f277ca44b8..819514bb60 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -195,13 +195,11 @@ bool wxPrinterDC::StartDoc(const wxString& message) int ret = ::StartDoc(GetHdc(), &docinfo); -#ifndef __WIN16__ if (ret <= 0) { DWORD lastError = GetLastError(); wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError); } -#endif return (ret > 0); } @@ -309,15 +307,10 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst) { // Retrieve the default device name wxString portName; -#ifdef __WXDEBUG__ - bool ret = -#else // !Debug - (void) -#endif // Debug/Release - wxGetDefaultDeviceName(devNameStr, portName); - - wxASSERT_MSG( ret, wxT("Could not get default device name.") ); - + if ( !wxGetDefaultDeviceName(devNameStr, portName) ) + { + return 0; // Could not get default device name + } deviceName = devNameStr.c_str(); }