FileSystem: Throw exception if openReadRaw fails

This commit is contained in:
Ancurio 2021-10-06 23:43:16 +02:00
parent 45a967b3cd
commit b165638fb3
1 changed files with 3 additions and 1 deletions

View File

@ -689,7 +689,9 @@ void FileSystem::openReadRaw(SDL_RWops &ops,
bool freeOnClose)
{
PHYSFS_File *handle = PHYSFS_openRead(filename);
assert(handle);
if (!handle)
throw Exception(Exception::NoFileError, "%s", filename);
initReadOps(handle, ops, freeOnClose);
}