Fix occasional crash on exit under Wayland
pthread_cancel was sometimes called once the thread had exited, resolve this by having the function wait to be canceled.
This commit is contained in:
parent
8a4ab1b3fe
commit
c007e6a346
@ -5470,6 +5470,13 @@ static void *gwl_display_event_thread_fn(void *display_voidp)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait until the main thread cancels this thread, otherwise this thread may exit
|
||||
* before cancel is called, causing a crash on exit. */
|
||||
while (true) {
|
||||
pause();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user