Skip to content

Commit cf3a5b4

Browse files
check_dependencies: Fix crash if a dependency is missing
Just needed to move a bit of code up slightly
1 parent c5f35ad commit cf3a5b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

loader/mod_loader.gd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,16 @@ func _check_dependencies(mod_id:String, deps:Array):
298298

299299
# loop through each dependency
300300
for dependency_id in deps:
301-
var dependency = mod_data[dependency_id]
302-
var dependency_meta_data = mod_data[dependency_id].meta_data
303-
304-
# Init the importance score if it's missing
305-
306301
# check if dependency is missing
307302
if(!mod_data.has(dependency_id)):
308303
_handle_missing_dependency(mod_id, dependency_id)
309304
continue
310305

306+
var dependency = mod_data[dependency_id]
307+
var dependency_meta_data = mod_data[dependency_id].meta_data
308+
309+
# Init the importance score if it's missing
310+
311311
# increase importance score by 1
312312
dependency.importance = dependency.importance + 1
313313
dev_log(str("Dependency -> ", dependency_id, " importance -> ", dependency.importance), LOG_NAME)

0 commit comments

Comments
 (0)