From d9079a5010859f45e5f60b385a9d579c85739626 Mon Sep 17 00:00:00 2001 From: jojo Date: Fri, 2 Oct 2020 18:06:36 +0200 Subject: [PATCH] Fix TraceManager.currentFrameSize --- .../src/de/steamwar/bausystem/tracer/TraceManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java index 43dc2a7..43ab8f5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java @@ -59,7 +59,8 @@ public class TraceManager { return new ArrayList<>(frameMap.getOrDefault(frameID, new ArrayList<>())); } - public static int currentFrameSize(){ + public static int currentFrameSize() { + if (!frameMap.containsKey(currentFrame)) return 0; return frameMap.get(currentFrame).size(); }