Merge pull request #4431 from kelnos/fix-exit-crash

GCAdapter: only join worker thread if running & joinable
This commit is contained in:
bunnei 2020-07-26 18:03:37 -07:00 committed by GitHub
commit 99d191d80d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,7 +265,9 @@ void Adapter::Reset() {
if (adapter_thread_running) { if (adapter_thread_running) {
adapter_thread_running = false; adapter_thread_running = false;
} }
if (adapter_input_thread.joinable()) {
adapter_input_thread.join(); adapter_input_thread.join();
}
adapter_controllers_status.fill(ControllerTypes::None); adapter_controllers_status.fill(ControllerTypes::None);
get_origin.fill(true); get_origin.fill(true);