]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcprint.cpp
don't crash in dtor if the dialog had never been shown (patch 1723848)
[wxWidgets.git] / src / msw / dcprint.cpp
index cc79c6b8fcab26a71dba7e1c33c2d653704b49ff..4b514b9e321e8556fbaeabc701ee4b3f370ca52e 100644 (file)
@@ -193,7 +193,7 @@ bool wxPrinterDC::StartDoc(const wxString& message)
     if (!m_hDC)
         return false;
 
-    if ( ::StartDoc(GetHdc(), &docinfo) < 0 )
+    if ( ::StartDoc(GetHdc(), &docinfo) <= 0 )
     {
         wxLogLastError(wxT("StartDoc"));
         return false;