summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorculler <culler>2020-12-04 20:23:13 (GMT)
committerculler <culler>2020-12-04 20:23:13 (GMT)
commit9a19a798482dfcedc151151cbebca1e676437798 (patch)
tree637e3bb924185b9498ecabb24e6ccd75b6735997 /macosx/tkMacOSXWm.c
parent3b6c6dcc849e594134f0e07f8465c17ba989b26d (diff)
downloadtk-9a19a798482dfcedc151151cbebca1e676437798.zip
tk-9a19a798482dfcedc151151cbebca1e676437798.tar.gz
tk-9a19a798482dfcedc151151cbebca1e676437798.tar.bz2
Cherrypick the fix for the segfault.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 1775cc4..569f531 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -2894,9 +2894,11 @@ WmManageCmd(
* See [4a40c6cace].
*/
- winPtr->changes.x -= macWin->xOff;
- winPtr->changes.y -= macWin->yOff;
- XMoveWindow(winPtr->display, winPtr->window, 0, 0);
+ if (macWin) {
+ winPtr->changes.x -= macWin->xOff;
+ winPtr->changes.y -= macWin->yOff;
+ XMoveWindow(winPtr->display, winPtr->window, 0, 0);
+ }
TkFocusSplit(winPtr);
Tk_UnmapWindow(frameWin);