Browse Source

(Hopefully) Fixed a bug where ImageData was not seen as preconverted by newImageFont (#73)

Bart van Strien 15 years ago
parent
commit
b2386d7201
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/opengl/wrap_Graphics.cpp

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

@@ -246,7 +246,7 @@ namespace opengl
 	int w_newImageFont(lua_State * L)
 	int w_newImageFont(lua_State * L)
 	{
 	{
 		// Convert to ImageData if necessary.
 		// Convert to ImageData if necessary.
-		if(lua_isstring(L, 1) || luax_istype(L, 1, FILESYSTEM_FILE_T) || luax_istype(L, 1, DATA_T))
+		if(lua_isstring(L, 1) || luax_istype(L, 1, FILESYSTEM_FILE_T) || (luax_istype(L, 1, DATA_T) && !luax_istype(L, 1, IMAGE_IMAGE_DATA_T)))
 			luax_convobj(L, 1, "image", "newImageData");
 			luax_convobj(L, 1, "image", "newImageData");
 
 
 		// Convert to Rasterizer if necessary.
 		// Convert to Rasterizer if necessary.