https://bugs.gentoo.org/959000
https://github.com/mpv-player/mpv/issues/16139
https://github.com/mpv-player/mpv/pull/16140
--- a/player/clipboard/clipboard-wayland.c
+++ b/player/clipboard/clipboard-wayland.c
@@ -349,4 +349,10 @@
         return false;
 
+    if (fds[2].revents & (POLLERR | POLLHUP | POLLNVAL))
+        destroy_offer(wl->selection_offer);
+
+    if (fds[3].revents & (POLLERR | POLLHUP | POLLNVAL))
+        destroy_offer(wl->primary_selection_offer);
+
     if (fds[2].revents & POLLIN)
         get_selection_data(wl, wl->selection_offer, false);
