From: Carl Hetherington Date: Mon, 25 Mar 2019 20:51:13 +0000 (+0000) Subject: Fix crash on pressing spacebar in the player with no film loaded (#1506). X-Git-Tag: v2.13.137~9 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=166f0a84d4d6637dbac2ffbbf165b64ceb990684 Fix crash on pressing spacebar in the player with no film loaded (#1506). --- diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index a1a5a59eb..7abc7c921 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -289,6 +289,9 @@ public: void playback_started (DCPTime time) { /* XXX: this only logs the first piece of content; probably should be each piece? */ + if (_film->content().empty()) { + return; + } shared_ptr dcp = dynamic_pointer_cast(_film->content().front()); if (dcp) {