From be28f5167c3804d1e68670b0afb1d57601a78a41 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 17 Mar 2024 19:15:50 +0000 Subject: Fix [4298ba64eb]: MacOSX complains about 0 sized images --- macosx/tkMacOSXImage.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v0.12