diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index b75b9aab9..d9a074d1a 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -395,6 +395,7 @@ int w_newImageFont(lua_State *L) // Convert to Rasterizer if necessary. if (luax_istype(L, 1, IMAGE_IMAGE_DATA_T)) { + luaL_checkstring(L, 2); int idxs[] = {1, 2}; luax_convobj(L, idxs, 2, "font", "newRasterizer"); }