From 1fba4511fae568f3b66f37dad6120c16cf70ea96 Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 5 Sep 2020 10:50:08 +0200 Subject: [PATCH 1/2] Fix null pointer exception --- .../src/de/steamwar/bausystem/tracer/TraceManager.java | 4 +++- 1 file changed, 3 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 84f9184..f2e9ed7 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java @@ -74,7 +74,9 @@ public class TraceManager { } int frameID = trace.getFrameID(); ShowManager.traceRemove(id); - frameMap.get(frameID).remove((Integer) id); + if (frameMap.containsKey(frameID)) { + frameMap.get(frameID).remove((Integer) id); + } testRemoveFrame(frameID); } } -- 2.39.5 From 63d787b2e4bb2286dada56c9d7ef7f44c5458ab9 Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 5 Sep 2020 11:45:40 +0200 Subject: [PATCH 2/2] Fix null pointer exception --- .../src/de/steamwar/bausystem/tracer/TraceManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java index f2e9ed7..c4cf4eb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TraceManager.java @@ -74,9 +74,7 @@ public class TraceManager { } int frameID = trace.getFrameID(); ShowManager.traceRemove(id); - if (frameMap.containsKey(frameID)) { - frameMap.get(frameID).remove((Integer) id); - } + if (frameMap.containsKey(frameID)) frameMap.get(frameID).remove((Integer) id); testRemoveFrame(frameID); } } -- 2.39.5