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.
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.