From 5b649902dc393e1d2df4d6f38b109868effc7b13 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 13 Jul 2014 15:04:25 -0400 Subject: [PATCH] DolphinWX: Remove the need for an explicit new/delete in ISOProperties Just use a normal constructor call and call Destroy to close the window. --- Source/Core/DolphinWX/ISOProperties.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp index 0593fd9c1f..43e92407b8 100644 --- a/Source/Core/DolphinWX/ISOProperties.cpp +++ b/Source/Core/DolphinWX/ISOProperties.cpp @@ -971,8 +971,7 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event) int PartitionNum = wxAtoi(PartitionName.Mid(PartitionName.find_first_of("0123456789"), 1)); const WiiPartition& Partition = WiiDisc[PartitionNum]; - wxProgressDialog* dialog = new wxProgressDialog( - _("Checking integrity..."), _("Working..."), 1000, this, + wxProgressDialog dialog(_("Checking integrity..."), _("Working..."), 1000, this, wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH ); @@ -981,11 +980,11 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event) while (thread.IsAlive()) { - dialog->Pulse(); + dialog.Pulse(); wxThread::Sleep(50); } - delete dialog; + dialog.Destroy(); if (!thread.Wait()) {