diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index 31def66a4..b75b9aab9 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -174,7 +174,7 @@ int w_newImage(lua_State *L) else data = luax_checktype(L, 1, "ImageData", IMAGE_IMAGE_DATA_T); - if (!data && !data) + if (!data && !cdata) return luaL_error(L, "Error creating image."); // Create the image.