Made font.gc() do null-check in case font.load() failed

This commit is contained in:
rxi 2020-04-22 00:41:23 +01:00
parent 9a32a00c73
commit 03eee86ddb
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ static int f_set_tab_width(lua_State *L) {
static int f_gc(lua_State *L) { static int f_gc(lua_State *L) {
RenFont **self = luaL_checkudata(L, 1, API_TYPE_FONT); RenFont **self = luaL_checkudata(L, 1, API_TYPE_FONT);
rencache_free_font(*self); if (*self) { rencache_free_font(*self); }
return 0; return 0;
} }