diff options
author | culler <culler> | 2020-08-23 14:28:05 (GMT) |
---|---|---|
committer | culler <culler> | 2020-08-23 14:28:05 (GMT) |
commit | 3b967bf8397e69bc3437a6c6a071516cba20702e (patch) | |
tree | 45355c49918774df10c1a31434d0d3ecff59fc77 /macosx/tkMacOSXImage.c | |
parent | ee6cc4ea5ad64d240ca940371ec26787ee2bbdb5 (diff) | |
download | tk-3b967bf8397e69bc3437a6c6a071516cba20702e.zip tk-3b967bf8397e69bc3437a6c6a071516cba20702e.tar.gz tk-3b967bf8397e69bc3437a6c6a071516cba20702e.tar.bz2 |
Address compiler warnings.
Diffstat (limited to 'macosx/tkMacOSXImage.c')
-rw-r--r-- | macosx/tkMacOSXImage.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 48ed06d..d4dcc78 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -545,7 +545,6 @@ CreateCGImageFromDrawableRect( CGImageRelease(cg_image); } } else if (TkMacOSXDrawableView(mac_drawable) != NULL) { - TKContentView *tkview = (TKContentView *)view; /* * Convert Tk top-left to NSView bottom-left coordinates. @@ -559,8 +558,7 @@ CreateCGImageFromDrawableRect( /* * Attempt to copy from the view to a bitmapImageRep. If the view does * not have a valid CGContext, doing this will silently corrupt memory - * and make a big mess. So, in that case, we mark the view as needing - * display and return NULL. + * and make a big mess. So, in that case, we just return NULL. */ if (view == [NSView focusView]) { @@ -570,7 +568,6 @@ CreateCGImageFromDrawableRect( CFRelease(bitmapRep); } else { TkMacOSXDbgMsg("No CGContext - cannot copy from screen to bitmap."); - [tkview addTkDirtyRect:[tkview bounds]]; result = NULL; } } else { @@ -663,7 +660,7 @@ XGetImage( if (cgImage) { bitmapRep = [NSBitmapImageRep alloc]; [bitmapRep initWithCGImage:cgImage]; - [cgImage release]; + CFRelease(cgImage); } else { TkMacOSXDbgMsg("XGetImage: Failed to construct CGImage"); return NULL; @@ -750,7 +747,6 @@ XCopyArea( { TkMacOSXDrawingContext dc; MacDrawable *srcDraw = (MacDrawable *) src; - NSBitmapImageRep *bitmapRep = NULL; CGImageRef img = NULL; CGRect bounds, srcRect, dstRect; |