diff options
Diffstat (limited to 'macosx/tkMacOSXImage.c')
-rw-r--r-- | macosx/tkMacOSXImage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 1d4238d..32f3db9 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -776,7 +776,6 @@ XGetImage( bitmap_fmt = [bitmapRep bitmapFormat]; size = [bitmapRep bytesPerPlane]; bytes_per_row = [bitmapRep bytesPerRow]; - bitmap = (char *)ckalloc(size); if ((bitmap_fmt != 0 && bitmap_fmt != NSAlphaFirstBitmapFormat) || [bitmapRep samplesPerPixel] != 4 || [bitmapRep isPlanar] != 0 @@ -786,6 +785,7 @@ XGetImage( [bitmapRep release]; return NULL; } + bitmap = (char *)ckalloc(size); memcpy(bitmap, (char *)[bitmapRep bitmapData], size); [bitmapRep release]; |