diff options
author | fvogel <fvogelnew1@free.fr> | 2019-11-09 10:18:10 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-11-09 10:18:10 (GMT) |
commit | bcb9c70e081e441f93428e84241226919588dc13 (patch) | |
tree | ac9ac811ce3ab793c264edad064859c7f1742b33 /win/tkWinWm.c | |
parent | 26733057747b9f7db38abe7f8c3a75132a8881f6 (diff) | |
download | tk-bcb9c70e081e441f93428e84241226919588dc13.zip tk-bcb9c70e081e441f93428e84241226919588dc13.tar.gz tk-bcb9c70e081e441f93428e84241226919588dc13.tar.bz2 |
Propagate previous Mac fix to the Windows platform
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 117b539..7df5dcf 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -5195,18 +5195,18 @@ WmStackorderCmd( if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); - if (windows == NULL) { - Tcl_Panic("TkWmStackorderToplevel failed"); - } - - resultObj = Tcl_NewObj(); - for (windowPtr = windows; *windowPtr ; windowPtr++) { - Tcl_ListObjAppendElement(NULL, resultObj, - TkNewWindowObj((Tk_Window) *windowPtr)); + if (windows != NULL) { + resultObj = Tcl_NewObj(); + for (windowPtr = windows; *windowPtr ; windowPtr++) { + Tcl_ListObjAppendElement(NULL, resultObj, + TkNewWindowObj((Tk_Window) *windowPtr)); + } + Tcl_SetObjResult(interp, resultObj); + ckfree(windows); + return TCL_OK; + } else { + return TCL_ERROR; } - Tcl_SetObjResult(interp, resultObj); - ckfree(windows); - return TCL_OK; } else { TkWindow *winPtr2, **winPtr2Ptr = &winPtr2; int index1 = -1, index2 = -1, result; @@ -6812,8 +6812,6 @@ TkWmStackorderToplevel( (LPARAM) &pair) == 0) { ckfree(windows); windows = NULL; - } else if (pair.windowPtr != (windows-1)) { - Tcl_Panic("num matched toplevel windows does not equal num children"); } done: |