Made font.gc() do null-check in case font.load() failed
This commit is contained in:
parent
9a32a00c73
commit
03eee86ddb
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue