Fix crash when adding cinemas while a search is in force (#2378).
[dcpomatic.git] / src / wx / markers_panel.h
index b88efa9a0af0a277cf5c66ce6e376f85a6cc2f6e..e34008a41fc5c0e4c29c9ef355ef1496e5fd2216 100644 (file)
 
 #include "lib/dcpomatic_time.h"
 #include "lib/film.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
 #include <map>
 
 
@@ -31,7 +34,7 @@ class wxTipWindow;
 class MarkersPanel : public wxPanel
 {
 public:
-       MarkersPanel (wxWindow* parent, std::weak_ptr<FilmViewer> viewer);
+       MarkersPanel(wxWindow* parent, FilmViewer& viewer);
 
        void set_film (std::weak_ptr<Film> film);
 
@@ -66,7 +69,7 @@ private:
        std::weak_ptr<Film> _film;
        std::map<dcp::Marker, Marker> _markers;
        boost::optional<dcp::Marker> _over;
-       std::weak_ptr<FilmViewer> _viewer;
+       FilmViewer& _viewer;
        boost::optional<dcp::Marker> _menu_marker;
 };