Skip to content

Commit

Permalink
Fix script editor null access
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVgr committed Jan 20, 2025
1 parent ab52302 commit e9bbf01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hide/comp/ScriptEditor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ScriptCache {

public static function loadApiFiles( config : hide.Config ) {
var files = config.get("script.api.files");
if( files != LAST_API_FILES || LAST_API_TYPES == null ) {
if( files != null && (files != LAST_API_FILES || LAST_API_TYPES == null) ) {
var key = files.join(";");
var types = TYPES_SAVE.get(key);
if( types == null ) {
Expand Down Expand Up @@ -163,7 +163,7 @@ class ScriptChecker {
}

function initTypes() {
if( apiHash == api.apiHash )
if( api != null && apiHash == api.apiHash )
return false;
apiHash = api.apiHash;
checker = new hscript.Checker();
Expand Down

0 comments on commit e9bbf01

Please sign in to comment.