summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXImage.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-17 19:15:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-17 19:15:50 (GMT)
commitbe28f5167c3804d1e68670b0afb1d57601a78a41 (patch)
treee943b951ce2bce2b249d3b6bb3c6cfe76b02eb74 /macosx/tkMacOSXImage.c
parentb0966ec52b2a3554f8285dd944844c78a4e6348f (diff)
downloadtk-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.c3
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;