Skip to content

Commit

Permalink
Fixed infinite loop in fixUniqueIdStr (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Jan 15, 2024
1 parent b18a11f commit 124bcb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electron.renderer/data/Project.hx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Project {

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

if( isUnique(baseId) )
Expand Down

0 comments on commit 124bcb3

Please sign in to comment.