diff --git a/src/modules/graphics/opengl/Font.cpp b/src/modules/graphics/opengl/Font.cpp index a850c7c55..28b104401 100644 --- a/src/modules/graphics/opengl/Font.cpp +++ b/src/modules/graphics/opengl/Font.cpp @@ -174,6 +174,16 @@ namespace opengl dx += glyph->spacing; } } + catch (utf8::invalid_code_point e) + { + glPopMatrix(); + throw love::Exception(e.what()); + } + catch (utf8::invalid_utf8 e) + { + glPopMatrix(); + throw love::Exception(e.what()); + } catch (utf8::exception e) { glPopMatrix(); @@ -210,6 +220,16 @@ namespace opengl temp += static_cast(g->spacing * mSpacing); } } + catch (utf8::invalid_code_point e) + { + glPopMatrix(); + throw love::Exception(e.what()); + } + catch (utf8::invalid_utf8 e) + { + glPopMatrix(); + throw love::Exception(e.what()); + } catch (utf8::exception e) { throw love::Exception(e.what());