From 49281333410c321e616c5d3cfd4308e21d0c9cb4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 12 Jan 2018 21:29:00 +0000 Subject: [PATCH] Fix crash when loading an incorrect KDM. --- ChangeLog | 2 ++ src/tools/dcpomatic_player.cc | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc61cb0d0..9e2c6bcfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2018-01-12 Carl Hetherington + * Fix crash when loading an incorrect KDM into the player (#1167). + * Desensitize appropriate player menu options when there is no loaded DCP (#1167). diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index f6f329c42..0464ce96e 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -289,13 +289,12 @@ private: DCPOMATIC_ASSERT (dcp); try { dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()), MAX_KDM_SIZE))); + dcp->examine (shared_ptr()); } catch (exception& e) { error_dialog (this, wxString::Format (_("Could not load KDM (%s)"), std_to_wx(e.what()))); d->Destroy (); return; } - - dcp->examine (shared_ptr()); } d->Destroy (); -- 2.30.2