From 07e2682f9b353a96e7cd3c2aae326d74caa2a0a5 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 12 Mar 2023 17:29:35 +0100 Subject: [PATCH] Fix dereferencing null pointer --- source/sdrefcount/sd_function_replacements.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sdrefcount/sd_function_replacements.cpp b/source/sdrefcount/sd_function_replacements.cpp index ef0ce1d..58c9b82 100644 --- a/source/sdrefcount/sd_function_replacements.cpp +++ b/source/sdrefcount/sd_function_replacements.cpp @@ -286,7 +286,7 @@ void NWF_Fix() { int state = OSDisableInterrupts(); OSThread *t = *((OSThread **) 0x100567F8); while (t) { - if (std::string_view(t->name) == "PlatformInputAppStateListenerThread") { + if (t->name != nullptr && std::string_view(t->name) == "PlatformInputAppStateListenerThread") { t->priority = 0x80; OSReport("Set priority to %d for thread \"%s\" (%08X) to prevent it from running/crashing\n", t->priority, t->name, t); }