diff options
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 8e7d4434e..94ec8506d 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -32,6 +32,7 @@ #include "subtitle_appearance_dialog.h" #include "text_panel.h" #include "text_view.h" +#include "wx_ptr.h" #include "wx_util.h" #include "lib/analyse_subtitles_job.h" #include "lib/dcp_content.h" @@ -370,8 +371,7 @@ TextPanel::dcp_track_changed () optional<DCPTextTrack> track; if (_dcp_track->GetSelection() == int(_dcp_track->GetCount()) - 1) { - auto d = new DCPTextTrackDialog (this); - ScopeGuard sg = [d]() { d->Destroy(); }; + auto d = make_wx<DCPTextTrackDialog>(this); if (d->ShowModal() == wxID_OK) { track = d->get(); } |
