Use wx_ptr more.
[dcpomatic.git] / src / wx / recipient_dialog.cc
index 688dcafbdc15d304f3a3568938201ba656ada735..b685f884aab55fe5f993715ed0cafd0529893f2e 100644 (file)
@@ -188,11 +188,10 @@ RecipientDialog::load_recipient (boost::filesystem::path file)
 void
 RecipientDialog::get_recipient_from_file ()
 {
-       auto d = new wxFileDialog (this, _("Select Certificate File"));
+       auto d = make_wx<wxFileDialog>(this, _("Select Certificate File"));
        if (d->ShowModal () == wxID_OK) {
                load_recipient (boost::filesystem::path (wx_to_std (d->GetPath ())));
        }
-       d->Destroy ();
 
        setup_sensitivity ();
 }