From 543268593b64fa9a41e3d6c34a33a1cae1e88486 Mon Sep 17 00:00:00 2001 From: Rafael Pax Date: Mon, 24 Apr 2017 19:57:34 +0200 Subject: [PATCH] NullContext thread safety The fields `timeThen` and `timeLate` are static. If multiple Applications are launched in different threads in headless mode, sync fails. This can be fixed removing the static modifier of the fields. --- jme3-core/src/main/java/com/jme3/system/NullContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/system/NullContext.java b/jme3-core/src/main/java/com/jme3/system/NullContext.java index e7969c89e..205d0a2c0 100644 --- a/jme3-core/src/main/java/com/jme3/system/NullContext.java +++ b/jme3-core/src/main/java/com/jme3/system/NullContext.java @@ -96,8 +96,8 @@ public class NullContext implements JmeContext, Runnable { } } - private static long timeThen; - private static long timeLate; + private long timeThen; + private long timeLate; public void sync(int fps) { long timeNow;