Skip to content

Fix #3634: Fix profile menu not greying out after deleting all profiles#3754

Open
catzh23 wants to merge 1 commit intoSuperTux:masterfrom
catzh23:profile-crash-fix
Open

Fix #3634: Fix profile menu not greying out after deleting all profiles#3754
catzh23 wants to merge 1 commit intoSuperTux:masterfrom
catzh23:profile-crash-fix

Conversation

@catzh23
Copy link
Copy Markdown

@catzh23 catzh23 commented Mar 23, 2026

When all profiles are deleted, the "Rename", "Reset" and "Delete" options in the profile menu remained active instead of being greyed out. This was caused by m_current_profile not being reset to nullptr after deletion, leaving a dangling pointer that made the menu think a profile was still selected.

Fix by setting m_current_profile to nullptr before calling refresh() in both the "Delete" and "Delete all" callbacks.

Closes #3634

…l profiles

When all profiles are deleted, the "Rename", "Reset" and
"Delete" options in the profile menu remained active instead
of being greyed out. This was caused by m_current_profile
not being reset to nullptr after deletion, leaving a dangling
pointer that made the menu think a profile was still selected.

Fix by setting m_current_profile to nullptr before calling
refresh() in both the "Delete" and "Delete all" callbacks.

Closes SuperTux#3634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SuperTux allows modifying a profile after all profiles have been deleted

1 participant