nn_boss: Check for nullptr

Fixes a crash in Super Smash Bros.
This commit is contained in:
goeiecool9999 2025-12-05 23:57:57 +01:00
parent 47b8d911b9
commit 5520613dc3

View file

@ -902,6 +902,8 @@ namespace iosu::boss
// handling automatic scheduling and task state transitions is quite complex
// for now we only run the task once
std::shared_ptr<RegisteredTask> registeredTask = GetRegisteredTask2(persistentId, taskId);
if(!registeredTask)
return;
TaskState state = registeredTask->GetState();
if (state == TaskState::Stopped || state == TaskState::Initial)
{