[Libreoffice-commits] core.git: jurt/com

Stephan Bergmann sbergman at redhat.com
Mon Jun 6 08:49:47 UTC 2016


 jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 5c2f970557791aa2b4a65a1c1298492a0f313225
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jun 6 10:49:11 2016 +0200

    cid#1362511: Concurrent data access violation
    
    Change-Id: I35a381f9601178a3aab98b11172d33372d5c3dc1

diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
index 131f2b5..7b96414 100644
--- a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
+++ b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
@@ -89,9 +89,11 @@ public class JobQueue {
             try {
                   enter(2000, _disposeId);
             } catch(Throwable throwable) {
-                if(!jobList.isEmpty() || _active) { // there was a job in progress, so give a stack
-                    System.err.println(getClass().getName() + " - exception occurred:" + throwable);
-                    throwable.printStackTrace(System.err);
+                synchronized (this) {
+                    if(!jobList.isEmpty() || _active) { // there was a job in progress, so give a stack
+                        System.err.println(getClass().getName() + " - exception occurred:" + throwable);
+                        throwable.printStackTrace(System.err);
+                    }
                 }
             }
             finally {


More information about the Libreoffice-commits mailing list