Fix crash on exit under Wayland
Order of free error from [0] caused the timer manager to be freed before the timer. [0]: 7de1a4d1d81ffd4cd2e75d911426edc847267244
This commit is contained in:
parent
e4f77c1a6c
commit
dbca0cc9d5
@ -975,9 +975,6 @@ static void gwl_display_destroy(GWL_Display *display)
|
||||
ghost_wl_display_lock_without_input(display->wl_display, display->system->server_mutex);
|
||||
display->events_pthread_is_active = false;
|
||||
}
|
||||
|
||||
delete display->ghost_timer_manager;
|
||||
display->ghost_timer_manager = nullptr;
|
||||
#endif
|
||||
|
||||
/* For typical WAYLAND use this will always be set.
|
||||
@ -1015,6 +1012,11 @@ static void gwl_display_destroy(GWL_Display *display)
|
||||
gwl_display_event_thread_destroy(display);
|
||||
display->system->server_mutex->unlock();
|
||||
}
|
||||
|
||||
/* Important to remove after the seats which may have key repeat timers active. */
|
||||
delete display->ghost_timer_manager;
|
||||
display->ghost_timer_manager = nullptr;
|
||||
|
||||
#endif /* USE_EVENT_BACKGROUND_THREAD */
|
||||
|
||||
if (display->wl_display) {
|
||||
|
Loading…
Reference in New Issue
Block a user