X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4a980f4f57a4e7eea00c55cbb3d139f97d90c20..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/html/htmprint.cpp?ds=sidebyside diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index ae29a67390..cacbefbc60 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->IsOk()) { if (HasPage(page)) RenderPage(dc, page);