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
This commit is contained in:
Julian Smart
2007-08-29 16:40:46 +00:00
parent f9f54ae680
commit 6dbe31d3de

View 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);