diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-17 19:15:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-17 19:15:50 (GMT) |
commit | be28f5167c3804d1e68670b0afb1d57601a78a41 (patch) | |
tree | e943b951ce2bce2b249d3b6bb3c6cfe76b02eb74 /macosx/tkMacOSXImage.c | |
parent | b0966ec52b2a3554f8285dd944844c78a4e6348f (diff) | |
download | tk-be28f5167c3804d1e68670b0afb1d57601a78a41.zip tk-be28f5167c3804d1e68670b0afb1d57601a78a41.tar.gz tk-be28f5167c3804d1e68670b0afb1d57601a78a41.tar.bz2 |
Fix [4298ba64eb]: MacOSX complains about 0 sized images
Diffstat (limited to 'macosx/tkMacOSXImage.c')
-rw-r--r-- | macosx/tkMacOSXImage.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 368a3ed..e51ad8d 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -502,6 +502,9 @@ TkMacOSXPutImage( MacDrawable *macDraw = (MacDrawable *)drawable; int result = Success; + if (width <= 0 || height <= 0) { + return Success; /* Is OK. Nothing to see here, literally. */ + } LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(drawable, gc, &dc)) { return BadDrawable; |