From b97b13bf2486ac226cb95ec9f4e6a8d6770d0359 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 22 Feb 2025 11:41:25 -0600 Subject: [PATCH] wayland: don't assert if DND fails while checking the fd It's not so nice. Print a warning instead. --- video/out/wayland_common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 81a17876b1..f46a34a6b6 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -2160,9 +2160,12 @@ static void check_fd(struct vo_wayland_state *wl, struct vo_wayland_data_offer * if (o->offer) wl_data_offer_finish(o->offer); - assert(o->action >= 0); - mp_event_drop_mime_data(wl->vo->input_ctx, o->mime_type, - content, o->action); + if (o->action >= 0) { + mp_event_drop_mime_data(wl->vo->input_ctx, o->mime_type, + content, o->action); + } else { + MP_WARN(wl, "Data offer did not have a valid action!\n"); + } } else { // Update clipboard text content talloc_free(wl->selection_text.start);