1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

SystemMenu: Fix bad behavior in shutdown dialog

The selected option was stored in a captured stack variable which was
long gone by the time we looked at it, so this dialog didn't really
behave the way you'd expect. Put it in a member instead. :^)
This commit is contained in:
Andreas Kling 2020-03-03 16:46:39 +01:00
parent 71e96ee728
commit b1d35248e4
2 changed files with 7 additions and 6 deletions

View file

@ -36,4 +36,6 @@ public:
private:
PowerDialog();
~PowerDialog();
int m_selected_option { -1 };
};