Browse Source

Formulas: fix null access

lviguier 5 months ago
parent
commit
10ff2547b8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hide/comp/ScriptEditor.hx

+ 2 - 0
hide/comp/ScriptEditor.hx

@@ -378,6 +378,8 @@ class ScriptChecker {
 				cl.fields.set(id, { name : id, params : [], canWrite : false, t : kind, isPublic: true, complete : true });
 			}
 			checker.setGlobal(name, TInst(cl,[]));
+			if (cdbEnums == null)
+				cdbEnums = [];
 			cdbEnums.push(name);
 			return kind;
 		}