From ec63e655d849d0546fb4d735f8c43b98daf61f0d Mon Sep 17 00:00:00 2001 From: "andrey.bychkov" Date: Thu, 6 Aug 2026 10:19:07 +0300 Subject: [PATCH] fix(PIThread): remove spurious unlock() in _waitForFinish The function called unlock() on thread_mutex without a matching lock(), causing UB on Windows (releasing an unowned critical section) or silently dropping a user-held lock. --- libs/main/thread/pithread.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/main/thread/pithread.cpp b/libs/main/thread/pithread.cpp index 0f9aa389..23070bba 100644 --- a/libs/main/thread/pithread.cpp +++ b/libs/main/thread/pithread.cpp @@ -1080,7 +1080,6 @@ bool PIThread::_waitForFinish(PISystemTime max_tm) { if (!running_) return true; #ifdef WINDOWS if (!isExists(PRIVATE->thread)) { - unlock(); return true; } #endif