From 95d6b0aca55a6068ccd7bd9f9db6385446b481f5 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 19 Feb 2026 22:34:10 +0100 Subject: [PATCH] Fixing a potential segfault during drawing This patch moves a lock inside the thread finishing code such that a race condition of the finish sequence and a random restart of the threads becomes impossible. This problem has been observed while randomly zooming with multiple drawing threads present. It's hard to reproduce. --- src/tl/tl/tlThreadedWorkers.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tl/tl/tlThreadedWorkers.cc b/src/tl/tl/tlThreadedWorkers.cc index 089b57873..13c26230a 100644 --- a/src/tl/tl/tlThreadedWorkers.cc +++ b/src/tl/tl/tlThreadedWorkers.cc @@ -412,9 +412,9 @@ JobBase::stop () m_stopping = false; m_running = false; - m_lock.unlock (); - stopped (); + + m_lock.unlock (); } void