From 42c755cac88d99d679a3817a83d723b82c81b6ba Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 23 May 2020 15:57:58 +0200 Subject: [PATCH] Don't try to join nonexistent threads This fixes a shutdown crash for individually hosted plugins. One more reason to refactor the host launch behavior! --- src/plugin/plugin-bridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugin/plugin-bridge.cpp b/src/plugin/plugin-bridge.cpp index f0d10584..3d24d090 100644 --- a/src/plugin/plugin-bridge.cpp +++ b/src/plugin/plugin-bridge.cpp @@ -482,7 +482,10 @@ intptr_t PluginBridge::dispatch(AEffect* /*plugin*/, // These threads should now be finished because we've forcefully // terminated the Wine process, interupting their socket operations - group_host_connect_handler.join(); + if (group_host_connect_handler.joinable()) { + // This thread is only used when using plugin groups + group_host_connect_handler.join(); + } host_callback_handler.join(); wine_io_handler.join();