From acc943329bad48d3a602d778674d8afebbc1a3df Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 10 Dec 2017 14:35:30 +0200 Subject: [PATCH] Added null check for probe in SectorAction.OnDestroy() Absence of check led to unhandled VM abort exception in case of saved game failed to load --- wadsrc/static/zscript/shared/sectoraction.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wadsrc/static/zscript/shared/sectoraction.txt b/wadsrc/static/zscript/shared/sectoraction.txt index 32302959ad..fb7edfb194 100644 --- a/wadsrc/static/zscript/shared/sectoraction.txt +++ b/wadsrc/static/zscript/shared/sectoraction.txt @@ -37,13 +37,16 @@ class SectorAction : Actor else { Actor probe = CurSector.SecActTarget; - while (probe.tracer != self && probe.tracer != null) + if (null != probe) { - probe = probe.tracer; - } - if (probe.tracer == self) - { - probe.tracer = tracer; + while (probe.tracer != self && probe.tracer != null) + { + probe = probe.tracer; + } + if (probe.tracer == self) + { + probe.tracer = tracer; + } } } }