Merge master.
[dcpomatic.git] / src / wx / film_viewer.cc
index f2f6ba23d73e1b6e987787b68d8388be174928a5..ef5c78f24ae2b628751b493fb9a2f618c7ec047a 100644 (file)
@@ -55,7 +55,7 @@ using boost::dynamic_pointer_cast;
 using boost::weak_ptr;
 using dcp::Size;
 
-FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
+FilmViewer::FilmViewer (wxWindow* p)
        : wxPanel (p)
        , _panel (new wxPanel (this))
        , _outline_content (new wxCheckBox (this, wxID_ANY, _("Outline content")))
@@ -109,8 +109,8 @@ FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
        _back_button->Bind    (wxEVT_COMMAND_BUTTON_CLICKED,       boost::bind (&FilmViewer::back_clicked,    this));
        _forward_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED,       boost::bind (&FilmViewer::forward_clicked, this));
 
-       set_film (f);
-
+       set_film (shared_ptr<Film> ());
+       
        JobManager::instance()->ActiveJobsChanged.connect (
                bind (&FilmViewer::active_jobs_changed, this, _1)
                );
@@ -410,7 +410,8 @@ FilmViewer::player_changed (bool frequent)
 void
 FilmViewer::setup_sensitivity ()
 {
-       bool const c = !_film->content().empty ();
+       bool const c = _film && !_film->content().empty ();
+       
        _slider->Enable (c);
        _back_button->Enable (c);
        _forward_button->Enable (c);