From: Václav Slavík Date: Thu, 9 Aug 2012 15:52:11 +0000 (+0000) Subject: Fix crash when canceling printing in wxMSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/84cabd361bbff3909716c84c69644ac8df24930d Fix crash when canceling printing in wxMSW. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 76e64e19ec..02e37fb34e 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -531,9 +531,9 @@ wxPrintAbortDialog::wxPrintAbortDialog(wxWindow *parent, void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) { + wxCHECK( wxPrinterBase::sm_abortWindow != NULL ); + wxPrinterBase::sm_abortIt = true; - wxPrinterBase::sm_abortWindow->Show(false); - wxPrinterBase::sm_abortWindow->Close(true); wxPrinterBase::sm_abortWindow->Destroy(); wxPrinterBase::sm_abortWindow = NULL; }