diff --git a/src/filesystem.cpp b/src/filesystem.cpp index fe5d403..71a0043 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -650,7 +650,8 @@ 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); }