From: Julian Smart Date: Wed, 29 Aug 2007 16:41:01 +0000 (+0000) Subject: Avoid crash if user aborts the print X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/806f9e8330691d64966af62d35e6b3d88f30471e Avoid crash if user aborts the print git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index ae29a67390..cc804e27d3 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -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);