From cf866ab294469874e805561a36a7ef2948c43081 Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Sun, 30 Nov 2025 21:40:58 +0100 Subject: [PATCH] Don't bother trying to restart the emulator if sceSystemServiceLoadExec is called with an invalid path (#3845) --- src/core/libraries/system/systemservice.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/libraries/system/systemservice.cpp b/src/core/libraries/system/systemservice.cpp index c02c4b3c3..ce5542fc8 100644 --- a/src/core/libraries/system/systemservice.cpp +++ b/src/core/libraries/system/systemservice.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include #include "common/config.h" #include "common/logging/log.h" #include "common/singleton.h" @@ -1874,6 +1875,10 @@ int PS4_SYSV_ABI sceSystemServiceLoadExec(const char* path, const char* argv[]) auto emu = Common::Singleton::Instance(); auto mnt = Common::Singleton::Instance(); auto hostPath = mnt->GetHostPath(std::string_view(path)); + if (hostPath.empty()) { + LOG_INFO(Lib_SystemService, "Restart called with invalid file '{}', exiting.", path); + std::quick_exit(0); + } std::vector args; if (argv != nullptr) { for (const char** ptr = argv; *ptr != nullptr; ptr++) {