[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Wed Aug 9 10:15:28 UTC 2017


 vcl/source/app/scheduler.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 9f2a105aa1467224b662980f6d1c4a42e5d8bdfe
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Aug 9 12:14:28 2017 +0200

    Rephrase SchedulerMutex::acquire so it would work for nLockCount=0
    
    Change-Id: Ibd5f45b5829e51f872e90a4256ae875bc5d363d4

diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 26d904e0f661..b08444db93d3 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -120,12 +120,11 @@ void Scheduler::ImplDeInitScheduler()
 
 bool SchedulerMutex::acquire( sal_uInt32 nLockCount )
 {
-    do {
+    for (sal_uInt32 i = 0; i != nLockCount; ++i) {
         if ( !maMutex.acquire() )
             return false;
         ++mnLockDepth;
     }
-    while ( --nLockCount );
     return true;
 }
 


More information about the Libreoffice-commits mailing list