Make sure Display is dropped last

This commit is contained in:
Ivan Molodetskikh
2023-08-10 16:38:12 +04:00
parent 5d0353d0c1
commit 51363a3205
+4 -3
View File
@@ -33,11 +33,12 @@ pub struct LoopData {
niri: Niri,
display_handle: DisplayHandle,
// Last so that it's dropped after the Smithay state in Niri.
display: Display<Niri>,
tty: Option<Tty>,
winit: Option<Winit>,
// Last so that it's dropped after the Smithay state in Niri and related state in Tty.
// Otherwise it will segfault on quit.
display: Display<Niri>,
}
fn main() {