diff options
| author | Rémy Raes <contact@remyraes.com> | 2025-04-18 00:56:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 00:56:48 +0200 |
| commit | 1277b3711d3aedb48e83d854e3c734c2f368c7ef (patch) | |
| tree | c67e7eea4016a45a61ca2477b25e120f32072e46 /primedev/core/filesystem | |
| parent | 98e7b0e011221af53cb9390666ba039a5a4a437b (diff) | |
| download | NorthstarLauncher-1.30.1.tar.gz NorthstarLauncher-1.30.1.zip | |
Fix Null Deref crash (#846)v1.30.1-rc5v1.30.1
Co-authored-by: F1F7Y <filip.bartos07@proton.me>
Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
Diffstat (limited to 'primedev/core/filesystem')
| -rw-r--r-- | primedev/core/filesystem/rpakfilesystem.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/primedev/core/filesystem/rpakfilesystem.cpp b/primedev/core/filesystem/rpakfilesystem.cpp index c3e5e74e..e3f2a1be 100644 --- a/primedev/core/filesystem/rpakfilesystem.cpp +++ b/primedev/core/filesystem/rpakfilesystem.cpp @@ -484,6 +484,14 @@ HOOK(OpenFileHook, o_pOpenFile, void*, __fastcall, (const char* pPath, void* pCallback)) // clang-format on { + // NOTE [Fifty]: For some reason some users are getting pPath as null when + // loading a server, o_pOpenFile uses CreateFileA and checks + // its return value so this is completely safe + if (pPath == NULL) + { + return o_pOpenFile(pPath, pCallback); + } + fs::path path(pPath); std::string newPath = ""; fs::path filename = path.filename(); |
