Skip to content

Commit 131f294

Browse files
p1gp1gNeroBurner
authored andcommitted
Always hide lock popup when changing appview
It fixes a potential double-free when removing lock popup
1 parent 085ea37 commit 131f294

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
@@ -505,6 +505,11 @@ void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direc
505505
// This is mainly to fix an issue with receiving two notifications at the same time
506506
// and shouldn't happen otherwise.
507507
if (app != currentApp) {
508+
// We need to remove the popup
509+
// 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.
510+
// Not removing the popup will also prevent the popup to be raised on top of
511+
// the new app
512+
popupMessage.SetHidden(true);
508513
returnAppStack.Push(currentApp);
509514
appStackDirections.Push(direction);
510515
}

0 commit comments

Comments
 (0)