diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-05-10 06:59:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-05-10 06:59:20 (GMT) |
commit | defd945691ca07b4408357d7c911236d538b0cec (patch) | |
tree | 98664f99a969db14433a5a9bd11e6f37b7aeb12c /macosx/tkMacOSXImage.c | |
parent | ae887dc099e08cdfc59332f954de871227c36e08 (diff) | |
download | tk-defd945691ca07b4408357d7c911236d538b0cec.zip tk-defd945691ca07b4408357d7c911236d538b0cec.tar.gz tk-defd945691ca07b4408357d7c911236d538b0cec.tar.bz2 |
Slightly better fix for [72de53dab2]: unreachable code after Tcl_Panic() in tkWinDraw.c
Diffstat (limited to 'macosx/tkMacOSXImage.c')
-rw-r--r-- | macosx/tkMacOSXImage.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index c41b3a6..aad1ab0 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -443,6 +443,7 @@ TkMacOSXPutImage( { TkMacOSXDrawingContext dc; MacDrawable *macDraw = (MacDrawable *)drawable; + int result = Success; display->request++; if (!TkMacOSXSetupDrawingContext(drawable, gc, &dc)) { @@ -470,12 +471,14 @@ TkMacOSXPutImage( CFRelease(img); } else { TkMacOSXDbgMsg("Invalid source drawable"); + result = BadDrawable } } else { TkMacOSXDbgMsg("Invalid destination drawable"); + result = BadDrawable } TkMacOSXRestoreDrawingContext(&dc); - return Success; + return result; } int XPutImage(Display* display, Drawable drawable, GC gc, XImage* image, |