From 481a1d222ccd897592953a712c18e94694980eb8 Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Tue, 25 Mar 2025 16:31:41 +0000 Subject: [PATCH] Fix use after free If any page apply methods return false, the launcher breaks when opening an instance window for the second time Signed-off-by: TheKodeToad --- launcher/ui/pages/instance/DataPackPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/ui/pages/instance/DataPackPage.cpp b/launcher/ui/pages/instance/DataPackPage.cpp index ddc12d7b3..3ca86850a 100644 --- a/launcher/ui/pages/instance/DataPackPage.cpp +++ b/launcher/ui/pages/instance/DataPackPage.cpp @@ -125,7 +125,7 @@ bool GlobalDataPackPage::shouldDisplay() const bool GlobalDataPackPage::apply() { - return m_underlyingPage != nullptr && m_underlyingPage->apply(); + return m_underlyingPage == nullptr || m_underlyingPage->apply(); } void GlobalDataPackPage::openedImpl()