summaryrefslogtreecommitdiff
path: root/src/wx/content_panel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/content_panel.cc')
-rw-r--r--src/wx/content_panel.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index e035d1795..c18520c30 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -654,15 +654,12 @@ ContentPanel::add_folder(boost::filesystem::path folder)
auto ic = dynamic_pointer_cast<ImageContent> (i);
if (ic) {
auto e = new ImageSequenceDialog (_splitter);
- int const r = e->ShowModal();
- auto const frame_rate = e->frame_rate ();
- e->Destroy ();
+ ScopeGuard sg = [e]() { e->Destroy(); };
- if (r != wxID_OK) {
+ if (e->ShowModal() != wxID_OK) {
return;
}
-
- ic->set_video_frame_rate(_film, frame_rate);
+ ic->set_video_frame_rate(_film, e->frame_rate());
}
_film->examine_and_add_content (i);