FoundationGames / Phonos

A FabricMC mod adding radio and audio related blocks.
MIT License
12 stars 8 forks source link

Fixed null-pointer Exception on new entity speaker creation #21

Closed coolsa closed 2 years ago

coolsa commented 2 years ago

Just added a single check to see if the entity in the garbage collection list is null, preventing a crash on the tick when a speaker entity is added.

FoundationGames commented 2 years ago

This should be merged into the 1.17 branch, as 1.18 is based on that branch

FoundationGames commented 2 years ago

Also there shouldn't be a way to trigger this crash if the entity has been actually spawned into the world before being added as a receiver, unless a null entity is actually added

coolsa commented 2 years ago

Just changed this to target the 1.17 branch, though the issue that was causing it was my of my own making, so the safety check isn't really needed, outside of some unforeseen or incredibly rare error. Closing this PR.