diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-20 00:14:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-20 21:18:40 +0100 |
| commit | ff5ed87ed6730b62e037991cbd4a6b5ee43dd7cb (patch) | |
| tree | 4a8ccc38608e44f408994bcd14945495e9d79ab8 | |
| parent | 301f4bc1b9e4d0f095c1c11afa7d2d9a0c77b959 (diff) | |
Cleanup: use ScopeGuard.
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 5dd0a0afe..6c6e756ec 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -706,10 +706,12 @@ private: DCPOMATIC_ASSERT (dcp); try { if (dcp) { + ScopeGuard sg([this]() { + _viewer.set_coalesce_player_changes(false); + }); _viewer.set_coalesce_player_changes(true); dcp->add_kdm (dcp::EncryptedKDM(dcp::file_to_string(wx_to_std(d->GetPath()), MAX_KDM_SIZE))); examine_content(); - _viewer.set_coalesce_player_changes(false); } } catch (exception& e) { error_dialog (this, wxString::Format (_("Could not load KDM.")), std_to_wx(e.what())); |
