diff --git a/src/miner.cpp b/src/miner.cpp index acf678dcc..5f6abe654 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1986,6 +1986,8 @@ void static BitcoinMiner() if (minerThreads != NULL) { minerThreads->interrupt_all(); + // Wait for all miner threads to fully terminate before destroying shared resources + minerThreads->join_all(); delete minerThreads; minerThreads = NULL;