Fix crash when loading an incorrect KDM.
authorCarl Hetherington <cth@carlh.net>
Fri, 12 Jan 2018 21:29:00 +0000 (21:29 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 12 Jan 2018 21:29:00 +0000 (21:29 +0000)
ChangeLog
src/tools/dcpomatic_player.cc

index fc61cb0d0dc24234a33b82550909f73232f436b6..9e2c6bcfa59130dfbd0e2eec21ada7e2533320c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2018-01-12  Carl Hetherington  <cth@carlh.net>
 
+       * Fix crash when loading an incorrect KDM into the player (#1167).
+
        * Desensitize appropriate player menu options when there
        is no loaded DCP (#1167).
 
index f6f329c42e0fa41cc487441de6f1b21624b673b3..0464ce96e00bef42ba4ea06394b3834c273ed66f 100644 (file)
@@ -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<Job>());
                        } 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<Job>());
                }
 
                d->Destroy ();