summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authorculler <culler>2019-11-10 18:13:49 (GMT)
committerculler <culler>2019-11-10 18:13:49 (GMT)
commitc6c3908ad15bb2ad9eb39b2b5177f601fe692d61 (patch)
tree02d5d45a7c6c194e6d44ed7890ab3a0ae24a1437 /unix/tkUnixWm.c
parent1ba2cee840613a4386f80189fce4169061cc6f40 (diff)
downloadtk-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/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c4
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);