Skip to content

Commit 10344e5

Browse files
p1gp1gNeroBurner
authored andcommitted
Always hide lock popup when changing appview
It fixes a potential double-free when removing lock popup
1 parent 3282333 commit 10344e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/displayapp/DisplayApp.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,11 @@ void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direc
506506
// This is mainly to fix an issue with receiving two notifications at the same time
507507
// and shouldn't happen otherwise.
508508
if (app != currentApp) {
509+
// We need to remove the popup
510+
// If we keep the popup linked to the previous view, and this view is deleted, a bug will occur if we try to re-remove the popup.
511+
// Not removing the popup will also prevent the popup to be raised on top of
512+
// the new app
513+
popupMessage.SetHidden(true);
509514
returnAppStack.Push(currentApp);
510515
appStackDirections.Push(direction);
511516
}

0 commit comments

Comments
 (0)