diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-14 01:23:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-14 01:23:06 +0100 |
| commit | 5800e1f2abecb709cbdc1408d1328f29cdbcb370 (patch) | |
| tree | c31c5a9bdb559855e22973ff8ccfb8b68db37891 /src/wx/timing_panel.cc | |
| parent | abcd6c9182507e6336a1839661dac856d5bea553 (diff) | |
Use ScopeGuard more.
Diffstat (limited to 'src/wx/timing_panel.cc')
| -rw-r--r-- | src/wx/timing_panel.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 5b8adc495..732cd07d5 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -33,6 +33,7 @@ #include "lib/dcp_subtitle_content.h" #include "lib/ffmpeg_content.h" #include "lib/image_content.h" +#include "lib/scope_guard.h" #include "lib/string_text_file_content.h" #include "lib/text_content.h" #include "lib/video_content.h" @@ -507,11 +508,11 @@ TimingPanel::move_to_start_of_reel_clicked () } auto d = new MoveToDialog(this, position, _parent->film()); + ScopeGuard sg = [d]() { d->Destroy(); }; if (d->ShowModal() == wxID_OK) { for (auto i: _parent->selected()) { i->set_position (_parent->film(), d->position()); } } - d->Destroy (); } |
