Browse Source

ScriptEditor: fix api null access

lviguier 8 tháng trước cách đây
mục cha
commit
8a933b9aea
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      hide/comp/ScriptEditor.hx

+ 1 - 1
hide/comp/ScriptEditor.hx

@@ -163,7 +163,7 @@ class ScriptChecker {
 	}
 
 	function initTypes() {
-		if( api != null && apiHash == api.apiHash )
+		if( api == null || apiHash == api.apiHash )
 			return false;
 		apiHash = api.apiHash;
 		checker = new hscript.Checker();