fix allocation of array of PNG image lines
svn: r2639
This commit is contained in:
parent
3d14a08240
commit
aa414049a0
|
@ -818,7 +818,7 @@ int wx_read_png(char *file_name, wxBitmap *bm, int w_mask, wxColour *bg)
|
||||||
#ifdef MZ_PRECISE_GC
|
#ifdef MZ_PRECISE_GC
|
||||||
rows = (png_bytep *)GC_malloc(sizeof(png_bytep) * height);
|
rows = (png_bytep *)GC_malloc(sizeof(png_bytep) * height);
|
||||||
#else
|
#else
|
||||||
rows = new WXGC_ATOMIC png_bytep[height];
|
rows = new WXGC_PTRS png_bytep[height];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
row_width = png_get_rowbytes(png_ptr, info_ptr);
|
row_width = png_get_rowbytes(png_ptr, info_ptr);
|
||||||
|
@ -1009,7 +1009,7 @@ int wx_write_png(char *file_name, wxBitmap *bm)
|
||||||
#ifdef MZ_PRECISE_GC
|
#ifdef MZ_PRECISE_GC
|
||||||
rows = (png_bytep *)GC_malloc(sizeof(png_bytep) * height);
|
rows = (png_bytep *)GC_malloc(sizeof(png_bytep) * height);
|
||||||
#else
|
#else
|
||||||
rows = new WXGC_ATOMIC png_bytep[height];
|
rows = new WXGC_PTRS png_bytep[height];
|
||||||
#endif
|
#endif
|
||||||
row_width = png_get_rowbytes(png_ptr, info_ptr);
|
row_width = png_get_rowbytes(png_ptr, info_ptr);
|
||||||
for (y = 0; y < height; y++) {
|
for (y = 0; y < height; y++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user