Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
GNU General Public License v3.0
16 stars 7 forks source link

Fixed a bug where pressing "return to main menu" multiple times leads to a crash in game over scene. #476

Closed Elshad19 closed 4 days ago

Elshad19 commented 4 days ago

Fixes #439.

Initially, when the player was dead, you could press "return to main menu" multiple times which led to a crash (Cannot call method 'queue_free' on a null value.). Now It is fixed using a simple boolean variable. Tested multiple times within the game, no issues whatsoever.

Note: the button can still be pressed multiple times, however it won't lead to the crash.