From 2e9320df0309a07f61d4483bfe79c5c4870cc11c Mon Sep 17 00:00:00 2001 From: ttrebuchon Date: Sun, 13 Aug 2023 15:18:09 -0400 Subject: [PATCH] Add check for whether targetcoord is nil in UpdateMarker() call --- Moose Development/Moose/Ops/Auftrag.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 7d4deac86..1bf4f8710 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -5776,10 +5776,12 @@ function AUFTRAG:UpdateMarker() -- Get target coordinates. Can be nil! local targetcoord=self:GetTargetCoordinate() - if self.markerCoaliton and self.markerCoaliton>=0 then - self.marker=MARKER:New(targetcoord, text):ReadOnly():ToCoalition(self.markerCoaliton) - else - self.marker=MARKER:New(targetcoord, text):ReadOnly():ToAll() + if targetcoord then + if self.markerCoaliton and self.markerCoaliton>=0 then + self.marker=MARKER:New(targetcoord, text):ReadOnly():ToCoalition(self.markerCoaliton) + else + self.marker=MARKER:New(targetcoord, text):ReadOnly():ToAll() + end end else