From d840ed90e10f501a3c332cf912e1e74c68a1bde6 Mon Sep 17 00:00:00 2001 From: "Brian J. Tarricone" Date: Sun, 26 Jul 2020 00:05:57 -0700 Subject: GCAdapter: only join worker thread if running & joinable --- src/input_common/gcadapter/gc_adapter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp index 29ea1f2c7..74759ea7d 100644 --- a/src/input_common/gcadapter/gc_adapter.cpp +++ b/src/input_common/gcadapter/gc_adapter.cpp @@ -265,7 +265,9 @@ void Adapter::Reset() { if (adapter_thread_running) { adapter_thread_running = false; } - adapter_input_thread.join(); + if (adapter_input_thread.joinable()) { + adapter_input_thread.join(); + } adapter_controllers_status.fill(ControllerTypes::None); get_origin.fill(true); -- cgit v1.2.3