Skip to content

Commit

Permalink
Progression: Fix crash with PickupSound type defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemon-King committed Jul 22, 2024
1 parent bec52fd commit a5618b7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ class PlayerSheetEventHandler: EventHandler {
Class<Inventory> cls = swapped;
String sfx = "";
if (swapped != "none" && swapped != "") {
sfx = GetDefaultByType(cls).PickupSound;
sfx = prog.FindSoundReplacement(sfx);
let o = GetDefaultByType(cls);
if (o) {
sfx = o.PickupSound;
sfx = prog.FindSoundReplacement(sfx);
}
};
node.AssignPickup(num, swapped, sfx);

Expand Down

0 comments on commit a5618b7

Please sign in to comment.