Don't bother re-examining content if loading a KDM fails.
authorCarl Hetherington <cth@carlh.net>
Sun, 26 Jul 2015 18:16:37 +0000 (19:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 26 Jul 2015 18:16:37 +0000 (19:16 +0100)
src/wx/content_menu.cc

index 2218c5c085fe4479ff8b569c30d209c9429ccb56..415039cb1bbc48b68134ecc3ca47b2f3a70c5386 100644 (file)
@@ -317,6 +317,8 @@ ContentMenu::kdm ()
                        dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()))));
                } catch (exception& e) {
                        error_dialog (_parent, wxString::Format (_("Could not load KDM (%s)"), e.what ()));
+                       d->Destroy ();
+                       return;
                }
 
                shared_ptr<Film> film = _film.lock ();