git repos / blockattack-game

commit 7f03a124

Poul Sander · 2021-09-24 13:46
7f03a1246a5917d1838a3797e925a3a8bed12c51 patch · browse files
parent 343e102f0aa050bbe83940175b947aedc20a126d

Protect against a segmentation fault that happened if the user picked "Just this once" on the Safe mode screen

Changed files

M source/code/MenuSystem.h before
diff --git a/source/code/MenuSystem.h b/source/code/MenuSystem.h index daeb37b..d532fdf 100644 --- a/source/code/MenuSystem.h +++ b/source/code/MenuSystem.h
@@ -53,7 +53,7 @@ class Button
{
private:
//Pointer to a callback function.
- void (*action)(void);
+ void (*action)(void) = nullptr;
//If true the menu should also be closed then the button is clicked
bool popOnRun = false;