]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix crash when canceling printing in wxMSW.
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 9 Aug 2012 15:52:11 +0000 (15:52 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 9 Aug 2012 15:52:11 +0000 (15:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/prntbase.cpp

index 76e64e19ec5a409080ea09881fb7fca17131eea2..02e37fb34e10391614298dfeb0d0812abd3b943d 100644 (file)
@@ -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;
 }