summaryrefslogtreecommitdiffstats
path: root/macosx
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 /macosx
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 'macosx')
-rw-r--r--macosx/tkMacOSXWm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 40fca11..086746b 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -2569,10 +2569,9 @@ WmIconphotoCmd(
width, height);
Tk_FreeImage(tk_icon);
if (newIcon == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "Failed to create an NSImage from \"%s\".",
- icon));
- Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "PHOTO", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "failed to create an iconphoto with image \"%s\"", icon));
+ Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "IMAGE", NULL);
return TCL_ERROR;
}
[NSApp setApplicationIconImage: newIcon];