From 0b04d60ce060ba3f3550c10d4e72cbca9785b336 Mon Sep 17 00:00:00 2001 From: Mathew Velasquez Date: Tue, 17 Nov 2015 11:16:37 -0500 Subject: [PATCH] Raise exception on FileSystem::openReadRaw --- src/filesystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }