From fe851f2e6e57d3a8781ecc173089c19632c521e3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 16 Jan 2023 01:14:37 +0100 Subject: Use wx_ptr more. --- src/wx/kdm_cpl_panel.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/wx/kdm_cpl_panel.cc') diff --git a/src/wx/kdm_cpl_panel.cc b/src/wx/kdm_cpl_panel.cc index b1bbc1cf0..1ddaa90cf 100644 --- a/src/wx/kdm_cpl_panel.cc +++ b/src/wx/kdm_cpl_panel.cc @@ -101,17 +101,14 @@ KDMCPLPanel::update_cpl_summary () void KDMCPLPanel::cpl_browse_clicked () { - wxFileDialog* d = new wxFileDialog (this, _("Select CPL XML file"), wxEmptyString, wxEmptyString, "*.xml"); + auto d = make_wx(this, _("Select CPL XML file"), wxEmptyString, wxEmptyString, "*.xml"); if (d->ShowModal() == wxID_CANCEL) { - d->Destroy (); return; } boost::filesystem::path cpl_file (wx_to_std (d->GetPath ())); boost::filesystem::path dcp_dir = cpl_file.parent_path (); - d->Destroy (); - try { /* XXX: hack alert */ cxml::Document cpl_document ("CompositionPlaylist"); -- cgit v1.2.3