natronium / GatorRando

A(n Archipelago) randomizer for Lil Gator Game
1 stars 0 forks source link

Util.GetSpriteForItem can cause Unity.Object.get_name to throw a NullReferenceException #58

Open natronium opened 2 months ago

natronium commented 2 months ago

Probably caused by a sprite getting deleted before we enumerate them (and access their names). Possibly fixed by accessing name with the null conditional (.?) operator, or failing that possibly with a null check?

google results about this are sparse but exist. unity object don't actually become null when they get deleted, they're just... very null shaped, which might cause potential problems.