[layers] Fixed crash on png saving (thanks Roberto)

git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1078 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-10-18 19:14:34 +00:00
parent 89f2173d70
commit 3037d1a84e

View File

@ -6881,7 +6881,7 @@ void Save_PNG(void)
/* ecriture des pixels de l'image */ /* ecriture des pixels de l'image */
Row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * Main_image_height); Row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * Main_image_height);
pixel_ptr = (Read_pixel_function==Read_pixel_from_current_screen)?Main_screen:Brush; pixel_ptr = (Read_pixel_function==Read_pixel_from_brush)?Brush:Main_screen;
for (y=0; y<Main_image_height; y++) for (y=0; y<Main_image_height; y++)
Row_pointers[y] = (png_byte*)(pixel_ptr+y*Main_image_width); Row_pointers[y] = (png_byte*)(pixel_ptr+y*Main_image_width);