Skip to content

qt: fix crash with Wayland on close if the surface is invalidated by Qt

Fatih Uzunoğlu requested to merge fuzun/vlc:qt/waylandcrashfix into master

If we allow Qt to close the interface window, the underlying "window" (surface in Wayland case) may be gone when it is still necessary by the application.

With Wayland, idle inhibitor needs the surface to initialize, so the surface must outlive the inhibitor. However, without the change proposed here, the inhibitor (zwp_idle_inhibitor_v1) may be destroyed after Qt is closed.

  1. Start the interface.
  2. Play a video.
  3. Stop the player.
  4. Close the interface.
  5. ** Crash **

This change should be fine, as we destroy the window ourselves anyway (at correct time) and destroying the window obviously closes it.

Edited by Fatih Uzunoğlu

Merge request reports

Loading