Poobslag / turbofat

Block-dropping puzzle game
MIT License
55 stars 19 forks source link

Added null checks for CurrentLevel.puzzle. #2857

Closed Poobslag closed 3 weeks ago

Poobslag commented 3 weeks ago

If certain signals were fired while no puzzle was active, a null pointer exception could cause a crash. I never saw this myself, as it would require something nonsensical like "a shark is smushed on the main menu screen," but it could potentially explain some of the crashes we're seeing on steam versions of the game.

Also added a null check for get_tree().current_scene. This method is only used in a demo, but we may as well check.