]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
Whoops, nasty malloc bug.
[lugaru.git] / Source / OpenGL_Windows.cpp
index 9d709dbc2685a0aa58e2feb7c00fe199997a5170..4c8326915dc57cb5e63dc1cd1fd4d9eed69c2ff5 100644 (file)
@@ -2679,10 +2679,6 @@ static bool load_png(const char *file_name, TGAImageRec &tex)
     if (!row_pointers)
         goto png_done;
 
-    retval = malloc(width * height * 4);
-    if (!retval)
-        goto png_done;
-
     if (!hasalpha)
     {
         png_byte *dst = tex.data;