From 585c4e6960bd087b38b83de95d56015ec08b0b52 Mon Sep 17 00:00:00 2001 From: jojo Date: Fri, 13 Nov 2020 17:16:10 +0100 Subject: [PATCH] Fix Tracer Warning --- .../src/de/steamwar/bausystem/tracer/TraceListener.java | 1 + .../src/de/steamwar/bausystem/tracer/TraceManager.java | 1 + 2 files changed, 2 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceListener.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceListener.java index 772ed8d..be87341 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceListener.java @@ -40,6 +40,7 @@ public class TraceListener implements Listener { TNTTrace trace; if (!tntMap.containsKey(tnt)) { trace = TraceManager.createTrace(); + if (trace == null) return; tntMap.put(tnt, trace); } else { trace = tntMap.get(tnt); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java index 43ab8f5..1491610 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java @@ -40,6 +40,7 @@ public class TraceManager { } public static TNTTrace createTrace() { + if (!frameMap.containsKey(currentFrame)) return null; TNTTrace trace = new TNTTrace(currentFrame); int id = generateID(); traceMap.put(id, trace); -- 2.39.5