From 237087adae902a825ee93efb66d79f86c790c10f Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 21 Mar 2023 21:14:50 +0100 Subject: [PATCH] Fix crash when inserting/removing the sd card in applets while the Wii U Menu is running --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e01d027..23875ed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -261,7 +262,7 @@ void SDCleanUpHandlesHandler() { } void SDAttachedHandler([[maybe_unused]] SDUtilsAttachStatus status) { - if (!sTitleRebooting) { + if (OSGetForegroundBucket(nullptr, nullptr) && !sTitleRebooting) { _SYSLaunchTitleWithStdArgsInNoSplash(OSGetTitleID(), nullptr); sTitleRebooting = true; }