diff options
author | culler <culler> | 2019-11-10 18:13:49 (GMT) |
---|---|---|
committer | culler <culler> | 2019-11-10 18:13:49 (GMT) |
commit | c6c3908ad15bb2ad9eb39b2b5177f601fe692d61 (patch) | |
tree | 02d5d45a7c6c194e6d44ed7890ab3a0ae24a1437 /unix | |
parent | 1ba2cee840613a4386f80189fce4169061cc6f40 (diff) | |
download | tk-c6c3908ad15bb2ad9eb39b2b5177f601fe692d61.zip tk-c6c3908ad15bb2ad9eb39b2b5177f601fe692d61.tar.gz tk-c6c3908ad15bb2ad9eb39b2b5177f601fe692d61.tar.bz2 |
Make all platforms check if an iconphoto image is valid and provide the same error message if not.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixWm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index bc7f1cb..b284622 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -2447,6 +2447,10 @@ WmIconphotoCmd( photo = Tk_FindPhoto(interp, Tcl_GetString(objv[i])); if (photo == NULL) { ckfree((char *) iconPropertyData); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "failed to create an iconphoto with image \"%s\"", + Tcl_GetString(objv[i]))); + Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "PHOTO", NULL); return TCL_ERROR; } Tk_PhotoGetSize(photo, &width, &height); |