diff --git a/src/font_sdlttf.c b/src/font_sdlttf.c index 2f6eb32..dd6086d 100644 --- a/src/font_sdlttf.c +++ b/src/font_sdlttf.c @@ -73,6 +73,8 @@ static agsurface_t *font_sdlttf_get_glyph(const unsigned char *msg) { static SDL_Surface *fs; static agsurface_t result; + if (!fontset) + return NULL; if (fs) { SDL_FreeSurface(fs); fs = NULL; @@ -148,6 +150,8 @@ static int font_sdlttf_draw_glyph(int x, int y, const unsigned char *str, int cl if (!*str) return 0; + if (!fontset) + return 0; conv = sjis2lang(str); if (this->antialiase_on) {