diff options
author | fvogel <fvogelnew1@free.fr> | 2020-11-15 21:16:56 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-11-15 21:16:56 (GMT) |
commit | 226b078bd6a53a1653f61c533c87568871fa03d7 (patch) | |
tree | 5755da58f03e79b5659cb0fb5aaac89e6d374c06 /win/tkWinSysTray.c | |
parent | c9e654f7b3574a15804533495fc84e47ea929ab2 (diff) | |
download | tk-226b078bd6a53a1653f61c533c87568871fa03d7.zip tk-226b078bd6a53a1653f61c533c87568871fa03d7.tar.gz tk-226b078bd6a53a1653f61c533c87568871fa03d7.tar.bz2 |
Backout previous commit, which wasn't such a good idea after all (the changeProc must exist in Tk_GetImage otherwise there are crashes, for instance in DeleteImage). Plan B is to use the same error message as in Tk_GetImage, to provide plaftorm consistency.
Diffstat (limited to 'win/tkWinSysTray.c')
-rw-r--r-- | win/tkWinSysTray.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/win/tkWinSysTray.c b/win/tkWinSysTray.c index 0d45dbb..68a2dcc 100644 --- a/win/tkWinSysTray.c +++ b/win/tkWinSysTray.c @@ -977,11 +977,11 @@ CreateIcoFromTkImage( unsigned size; BITMAPINFO bmInfo; ICONINFO iconInfo; - Tk_Image tk_image; - Tk_Window tkwin = Tk_MainWindow(interp); - tk_image = Tk_GetImage(interp, tkwin, image, NULL, NULL); - if (tk_image == NULL) { + photo = Tk_FindPhoto(interp, image); + if (photo == NULL) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "image \"%s\" doesn't exist", image)); return NULL; } @@ -998,7 +998,6 @@ CreateIcoFromTkImage( iconBits->nNumImages = 1; - photo = Tk_FindPhoto(interp, image); Tk_PhotoGetSize(photo, &width, &height); Tk_PhotoGetImage(photo, &block); |