Browse Source

Error when the second argument to love.graphics.newImage isn't a table.

--HG--
branch : minor
Alex Szpakowski 11 years ago
parent
commit
75cf164507
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/modules/graphics/opengl/wrap_Graphics.cpp

+ 1 - 0
src/modules/graphics/opengl/wrap_Graphics.cpp

@@ -161,6 +161,7 @@ int w_newImage(lua_State *L)
 	Image::Flags flags;
 	if (!lua_isnoneornil(L, 2))
 	{
+		luaL_checktype(L, 2, LUA_TTABLE);
 		flags.mipmaps = luax_boolflag(L, 2, imageFlagName(Image::FLAG_TYPE_MIPMAPS), flags.mipmaps);
 		flags.sRGB = luax_boolflag(L, 2, imageFlagName(Image::FLAG_TYPE_SRGB), flags.sRGB);
 	}