summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorculler <culler>2020-12-04 20:20:48 (GMT)
committerculler <culler>2020-12-04 20:20:48 (GMT)
commitf5312f21552eeb863f2d46fec33b0e4d4fc2173d (patch)
tree37cc39459ea765f1c028ff4bbd8a01aa76070fb4
parent3e402b4b44c3911d21724c95ea124cc991fac639 (diff)
downloadtk-f5312f21552eeb863f2d46fec33b0e4d4fc2173d.zip
tk-f5312f21552eeb863f2d46fec33b0e4d4fc2173d.tar.gz
tk-f5312f21552eeb863f2d46fec33b0e4d4fc2173d.tar.bz2
Fix segfault introduced by the fix for [4a40c6cace].
-rw-r--r--macosx/tkMacOSXWm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index c100d38..942a6f8 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);