From 01b9ff08431a234266934ff2dd4f0e8a3294e649 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 14 Jan 2014 15:44:34 +0000 Subject: [PATCH] Fix for setting thread priority while the thread isn't running. --- modules/juce_core/threads/juce_Thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_core/threads/juce_Thread.cpp b/modules/juce_core/threads/juce_Thread.cpp index 70318dc3ad..3d1ff0ab1a 100644 --- a/modules/juce_core/threads/juce_Thread.cpp +++ b/modules/juce_core/threads/juce_Thread.cpp @@ -221,7 +221,7 @@ bool Thread::setPriority (const int newPriority) const ScopedLock sl (startStopLock); - if (setThreadPriority (threadHandle, newPriority)) + if ((! isThreadRunning()) || setThreadPriority (threadHandle, newPriority)) { threadPriority = newPriority; return true;