diff --git a/wsi/wayland/swapchain.cpp b/wsi/wayland/swapchain.cpp index 5307719..473ac53 100644 --- a/wsi/wayland/swapchain.cpp +++ b/wsi/wayland/swapchain.cpp @@ -75,6 +75,11 @@ public: return m_buffer.get(); } + void remove_proxy() + { + wl_proxy_set_queue(reinterpret_cast(m_buffer.get()), nullptr); + } + private: wayland::wayland_owner m_buffer; }; @@ -99,7 +104,11 @@ swapchain::~swapchain() { for (auto &img : m_swapchain_images) { - img.set_data(util::unique_ptr()); + auto data = img.get_data(); + if (data != nullptr) + { + data->remove_proxy(); + } } wl_display_roundtrip_queue(m_display, m_buffer_queue);