Skip to content

Commit ee559c4

Browse files
authored
Fix crash on trying to get empty file identifier (#2480)
1 parent 27c8f96 commit ee559c4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/dialogic/Core/DialogicResourceUtil.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static func add_resource_to_directory(file_path:String, directory:Dictionary) ->
6262
## Returns the unique identifier for the given resource path.
6363
## Returns an empty string if no identifier was found.
6464
static func get_unique_identifier(file_path:String) -> String:
65+
if not file_path: return ""
6566
var identifier: String = get_directory(file_path.get_extension()).find_key(file_path)
6667
if typeof(identifier) == TYPE_STRING:
6768
return identifier

0 commit comments

Comments
 (0)