History

wayland: don't assert if DND fails while checking the fd

It's not so nice. Print a warning instead.

Dudemanguy committed 1 year ago

Commit b97b13b1 parent 6f6346b1 file · +6 −3Browse files

Unified · Split

video/out/wayland_common.c+6−3
@@ -2160,9 +2160,12 @@ static void check_fd(struct vo_wayland_state *wl, struct vo_wayland_data_offer * · 2159 unmodified lines
21602160 if (o->offer)
21612161 wl_data_offer_finish(o->offer);
21622162
2163− assert(o->action >= 0);
2164− mp_event_drop_mime_data(wl->vo->input_ctx, o->mime_type,
2165− content, o->action);
2163+ if (o->action >= 0) {
2164+ mp_event_drop_mime_data(wl->vo->input_ctx, o->mime_type,
2165+ content, o->action);
2166+ } else {
2167+ MP_WARN(wl, "Data offer did not have a valid action!\n");
2168+ }
21662169 } else {
21672170 // Update clipboard text content
21682171 talloc_free(wl->selection_text.start);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t