Skip to content

wayland: fix late wl_data_offer::accept crashing Qt

Fushan Wen requested to merge work/fuf/crash into master

If wl_data_offer::accept is sent after wl_data_source::dnd_drop_performed, at this time the event loop in QBasicDrag::drag already exits and m_drag becomes nullptr, so if there is a late wl_data_offer::accept event, Qt will still try to access m_drag to set response but it will cause a crash.

Test: Drag a task item from the task manager to Firefox web area

It looks like a bug in Firefox, but data source should be immune to such questionable (I don't find the doc says it's illegal) behavior, so it can also be a bug in Qt because the crash is also reproducible on mutter.

Edited by Fushan Wen

Merge request reports

Loading