summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authorculler <culler>2019-11-10 18:35:46 (GMT)
committerculler <culler>2019-11-10 18:35:46 (GMT)
commit7f952ce8386b3060408ee6f672760bc55606080d (patch)
tree864701ccd4bde8e31723c77faf32b02523bf309f /unix/tkUnixWm.c
parent62caa9e27341a3355e8067480fd2a0fe5d942281 (diff)
downloadtk-7f952ce8386b3060408ee6f672760bc55606080d.zip
tk-7f952ce8386b3060408ee6f672760bc55606080d.tar.gz
tk-7f952ce8386b3060408ee6f672760bc55606080d.tar.bz2
On unix, make the wm stackorder command return an error if TkWmStackorderToplevel fails.
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index bc7f1cb..0ebd4ac 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -3268,6 +3268,8 @@ WmStackorderCmd(
ckfree(windows);
Tcl_SetObjResult(interp, resultObj);
return TCL_OK;
+ } else {
+ return TCL_ERROR;
}
} else {
Tk_Window relWin;
@@ -6432,6 +6434,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