diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index 299be4c4a..8ab9b8978 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -87,7 +87,7 @@ TimelineLayoutHelper::get_track_header_rect( return optional(); } -weak_ptr +shared_ptr TimelineLayoutHelper::header_from_point(const Gdk::Point &point) { std::pair, Gdk::Rectangle> pair; @@ -100,7 +100,7 @@ TimelineLayoutHelper::header_from_point(const Gdk::Point &point) point.get_x() < rect.get_x() + rect.get_width() && point.get_y() >= rect.get_y() && point.get_y() < rect.get_y() + rect.get_height()) - return pair.first; + return shared_ptr(pair.first); } // No track was found - return an empty pointer diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index 3e9d77145..6ca659365 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -69,7 +69,7 @@ public: boost::optional get_track_header_rect( boost::weak_ptr track); - boost::weak_ptr header_from_point( + boost::shared_ptr header_from_point( const Gdk::Point &point); boost::shared_ptr track_from_y(const int y);