Patch #920 2006-03-13 17:09

sethjackson

wxWindow::Destroy()
Download
920-wxWindow_Destro.patch (2.0 KB)
Category
 
Status
Accepted
Close date
2006-03-15 08:37
Assigned to
 
Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp    (revision 2188)
+++ src/sdk/editormanager.cpp    (working copy)
@@ -1146,14 +1146,14 @@
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_CANCEL)
     {
-        delete dlg;
+        dlg->Destroy();
         return -2;
     }
 
     // Don't look for empty strings:
     if (dlg->GetFindString().empty())
     {
-        delete dlg;
+        dlg->Destroy();
         cbMessageBox(_("Can't look for an empty search criterion!"), _("Error"), wxOK | wxICON_EXCLAMATION, Manager::Get()->GetAppWindow());
         return -2;
     }
@@ -1180,7 +1180,7 @@
     m_LastFindReplaceData->hiddenSearch = dlg->GetHidden();
     m_LastFindReplaceData->initialreplacing = false;
 
-    delete dlg;
+    dlg->Destroy();
 
     if (!replace)
     {
Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp    (revision 2188)
+++ src/src/main.cpp    (working copy)
@@ -1084,7 +1084,7 @@
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
         sel = dlg->GetPath();
-    delete dlg;
+    dlg->Destroy();
     return sel;
 }
 
@@ -1732,7 +1732,7 @@
         OnDropFiles(0,0,files);
     }
 
-    delete dlg;
+    dlg->Destroy();
 }
 
 void MainFrame::OnFileReopenProject(wxCommandEvent& event)
@@ -1872,7 +1872,7 @@
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
         Manager::Get()->GetScriptingManager()->LoadScript(dlg->GetPath());
-    delete dlg;
+    dlg->Destroy();
 }
 
 void MainFrame::OnFileQuit(wxCommandEvent& WXUNUSED(event))
@@ -2472,7 +2472,7 @@
         OnDropFiles(0,0,files);
     }
 
-    delete dlg;
+    dlg->Destroy();
 }
 
 void MainFrame::OnProjectSaveProject(wxCommandEvent& event)
@@ -2558,7 +2558,7 @@
     dlgAbout* dlg = new dlgAbout(this);
     PlaceWindow(dlg, pdlHead);
     dlg->ShowModal();
-    delete dlg;
+    dlg->Destroy();
 }
 
 void MainFrame::OnHelpTips(wxCommandEvent& event)
sethjackson 2006-03-14 18:24

Ignore this comment just testing to see if I get mail. Don't ignore the patch though..... ;)