Make reset() safer if the new throws.
[dcpomatic.git] / src / wx / text_view.h
index f8aba8ffd23a893793e56b467a9e226e8a52c5e6..8cf3c78bbf580480270810723f06878204f50a47 100644 (file)
@@ -38,7 +38,7 @@ public:
                std::shared_ptr<Content> content,
                std::shared_ptr<TextContent> caption,
                std::shared_ptr<Decoder>,
-               std::weak_ptr<FilmViewer> viewer
+               FilmViewer& viewer
                );
 
 private:
@@ -52,5 +52,5 @@ private:
        boost::optional<int> _last_count;
        std::vector<dcpomatic::ContentTime> _start_times;
        std::weak_ptr<Content> _content;
-       std::weak_ptr<FilmViewer> _film_viewer;
+       FilmViewer& _film_viewer;
 };