diff --git a/src/display/font.cpp b/src/display/font.cpp index 78e2ae3..a1f2b1d 100644 --- a/src/display/font.cpp +++ b/src/display/font.cpp @@ -209,7 +209,12 @@ _TTF_Font *SharedFontState::getFont(std::string family, ? req.regular.c_str() : req.other.c_str(); ops = SDL_AllocRW(); - shState->fileSystem().openReadRaw(*ops, path, true); + try{ + shState->fileSystem().openReadRaw(*ops, path, true); + } catch (const Exception &e) { + SDL_FreeRW(ops); + throw e; + } } // FIXME 0.9 is guesswork at this point