Fix crash on constant signal dialog

This commit is contained in:
tobspr 2020-08-28 23:10:07 +02:00
parent 807deaa705
commit 707323591b
1 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,11 @@ export class ConstantSignalSystem extends GameSystemWithFilter {
* @returns {BaseItem} * @returns {BaseItem}
*/ */
parseSignalCode(code) { parseSignalCode(code) {
if (!this.root || !this.root.shapeDefinitionMgr) {
// Stale reference
return null;
}
code = trim(code); code = trim(code);
const codeLower = code.toLowerCase(); const codeLower = code.toLowerCase();