]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid crash if user aborts the print
authorJulian Smart <julian@anthemion.co.uk>
Wed, 29 Aug 2007 16:41:01 +0000 (16:41 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 29 Aug 2007 16:41:01 +0000 (16:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmprint.cpp

index ae29a673905c399b2ffaa559e35165ecc59101bd..cc804e27d34c35bb8041c4039f19407b78b72443 100644 (file)
@@ -251,7 +251,7 @@ bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage)
 bool wxHtmlPrintout::OnPrintPage(int page)
 {
     wxDC *dc = GetDC();
-    if (dc)
+    if (dc && dc->Ok())
     {
         if (HasPage(page))
             RenderPage(dc, page);