From e631609fae5ea0ac452c98a4a8623996df37e4be Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 11 Nov 2023 22:19:37 +0100 Subject: Cleanup: stack-allocated dialogs. --- src/wx/content_menu.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 73591eaed..5d9865970 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -402,15 +402,15 @@ ContentMenu::kdm () auto dcp = dynamic_pointer_cast (_content.front()); DCPOMATIC_ASSERT (dcp); - auto d = make_wx(_parent, _("Select KDM")); + wxFileDialog dialog(_parent, _("Select KDM")); - if (d->ShowModal() != wxID_OK) { + if (dialog.ShowModal() != wxID_OK) { return; } optional kdm; try { - kdm = dcp::EncryptedKDM (dcp::file_to_string(wx_to_std(d->GetPath()), MAX_KDM_SIZE)); + kdm = dcp::EncryptedKDM(dcp::file_to_string(wx_to_std(dialog.GetPath()), MAX_KDM_SIZE)); } catch (exception& e) { error_dialog (_parent, _("Could not load KDM"), std_to_wx(e.what())); return; -- cgit v1.2.3