]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/prntbase.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / prntbase.cpp
index c1467b1d837d20e8f4921e355cd81e794bb6186a..e71e729e054e278c55317921d70e99957118388f 100644 (file)
@@ -550,7 +550,7 @@ void wxPrintAbortDialog::SetProgress(int currentPage, int totalPages,
 
 void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
 {
-    wxCHECK( wxPrinterBase::sm_abortWindow != NULL );
+    wxCHECK_RET( wxPrinterBase::sm_abortWindow != NULL, "OnCancel called twice" );
 
     wxPrinterBase::sm_abortIt = true;
     wxPrinterBase::sm_abortWindow->Destroy();