X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84968677abe36133a45e0426c2a365da18851f90..f0f4301209cc58eb5562be289f49bf0fb9e7d6b8:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index f277ca44b8..53542de5ea 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -309,15 +309,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(); }