From 6dbe31d3de0251aeabd1c919afb63202190fdd05 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 29 Aug 2007 16:40:46 +0000 Subject: [PATCH] Avoid crash if user aborts the print git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmprint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 834e791b2b..325b1b4b43 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);