Skip to content

Commit 124bcb3

Browse files
committed
Fixed infinite loop in fixUniqueIdStr (#1051)
1 parent b18a11f commit 124bcb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/electron.renderer/data/Project.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class Project {
229229

230230
public function fixUniqueIdStr(baseId:String, ?styleOverride:ldtk.Json.IdentifierStyle, isUnique:String->Bool) : String {
231231
baseId = cleanupIdentifier(baseId, styleOverride==null ? identifierStyle : styleOverride);
232-
if( baseId=="_" )
232+
if( baseId=="_" || baseId==null )
233233
baseId = "Unnamed";
234234

235235
if( isUnique(baseId) )

0 commit comments

Comments
 (0)