diff options
author | culler <culler> | 2019-11-10 18:35:46 (GMT) |
---|---|---|
committer | culler <culler> | 2019-11-10 18:35:46 (GMT) |
commit | 7f952ce8386b3060408ee6f672760bc55606080d (patch) | |
tree | 864701ccd4bde8e31723c77faf32b02523bf309f /unix/tkUnixWm.c | |
parent | 62caa9e27341a3355e8067480fd2a0fe5d942281 (diff) | |
download | tk-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.c | 5 |
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 |