summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2019-11-20 18:50:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2019-11-20 18:50:02 (GMT)
commit72ae3baa490baaf69b7359b378361921e532ccde (patch)
tree0ceafbb929cc0ebd5eb08a80288844c8dbad7404 /unix
parent83adf45f708233fe1bed74cc67d714c40905dbbd (diff)
parente15390471f6368e52215eb6ff7bd88d3185d66e1 (diff)
downloadtk-72ae3baa490baaf69b7359b378361921e532ccde.zip
tk-72ae3baa490baaf69b7359b378361921e532ccde.tar.gz
tk-72ae3baa490baaf69b7359b378361921e532ccde.tar.bz2
Merge 8.6 except for the broken demo.
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixWm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index bc7f1cb..2c9e9dd 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", "IMAGE", NULL);
return TCL_ERROR;
}
Tk_PhotoGetSize(photo, &width, &height);
@@ -3268,6 +3272,8 @@ WmStackorderCmd(
ckfree(windows);
Tcl_SetObjResult(interp, resultObj);
return TCL_OK;
+ } else {
+ return TCL_ERROR;
}
} else {
Tk_Window relWin;
@@ -6432,6 +6438,9 @@ TkWmStackorderToplevel(
TkWmStackorderToplevelWrapperMap(parentPtr, parentPtr->display, &table);
window_ptr = windows = ckalloc((table.numEntries+1) * sizeof(TkWindow *));
+ if (windows == NULL) {
+ return NULL;
+ }
/*
* Special cases: If zero or one toplevels were mapped there is no need to