diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index 8c538a7c..304e7322 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -451,6 +451,11 @@ void FILESYSTEM_loadFileToMemory( PHYSFS_sint64 length; PHYSFS_sint64 success; + if (name == NULL || mem == NULL) + { + goto fail; + } + if (SDL_strcmp(name, "levels/special/stdin.vvvvvv") == 0) { // this isn't *technically* necessary when piping directly from a file, but checking for that is annoying