]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Allow Bitbases::init() to be called more than once
[stockfish] / src / thread.cpp
index ef5ae857e30580822b5c05cf2406a413a6eb05f6..048f2a7a053bcbb6cf29110498cd2f339622def7 100644 (file)
@@ -299,9 +299,12 @@ void ThreadPool::init() {
 void ThreadPool::exit() {
 
   delete_thread(timer); // As first because check_time() accesses threads data
+  timer = nullptr;
 
   for (Thread* th : *this)
       delete_thread(th);
+
+  clear(); // Get rid of stale pointers
 }