From c4362a7aa94d9340e38021a67a85635fc6cd4f7d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 4 Nov 2012 15:56:16 +0000 Subject: Fix crash when loading a film when one is already loaded. --- src/tools/dvdomatic.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index 5d19a142f..535e6d749 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -282,13 +282,14 @@ public: { wxDirDialog* c = new wxDirDialog (this, wxT ("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST); int const r = c->ShowModal (); - c->Destroy (); if (r == wxID_OK) { maybe_save_then_delete_film (); film.reset (new Film (wx_to_std (c->GetPath ()))); set_film (); } + + c->Destroy (); } void file_save (wxCommandEvent &) -- cgit v1.2.3