Browse Source

Fix love.font.newBMFontRasterizer when it's given a single file param.

Sasha Szpakowski 1 year ago
parent
commit
ba693500c4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/font/wrap_Font.cpp

+ 1 - 1
src/modules/font/wrap_Font.cpp

@@ -154,7 +154,7 @@ int w_newBMFontRasterizer(lua_State *L)
 			lua_pop(L, 1);
 			lua_pop(L, 1);
 		}
 		}
 	}
 	}
-	else
+	else if (!lua_isnoneornil(L, 2))
 	{
 	{
 		convimagedata(L, 2);
 		convimagedata(L, 2);
 		image::ImageData *id = luax_checktype<image::ImageData>(L, 2);
 		image::ImageData *id = luax_checktype<image::ImageData>(L, 2);