From 707323591b3fdf6c208d097fda155ea0c8f5c7af Mon Sep 17 00:00:00 2001 From: tobspr Date: Fri, 28 Aug 2020 23:10:07 +0200 Subject: [PATCH] Fix crash on constant signal dialog --- src/js/game/systems/constant_signal.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/game/systems/constant_signal.js b/src/js/game/systems/constant_signal.js index cdf742b3..93417ef5 100644 --- a/src/js/game/systems/constant_signal.js +++ b/src/js/game/systems/constant_signal.js @@ -107,6 +107,11 @@ export class ConstantSignalSystem extends GameSystemWithFilter { * @returns {BaseItem} */ parseSignalCode(code) { + if (!this.root || !this.root.shapeDefinitionMgr) { + // Stale reference + return null; + } + code = trim(code); const codeLower = code.toLowerCase();