summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXEmbed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index d6ce254..354a231 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -157,7 +157,7 @@ TkpMakeWindow(
macWin->xOff = 0;
macWin->yOff = 0;
macWin->toplevel = macWin;
- } else {
+ } else if (winPtr->parentPtr) {
macWin->xOff = winPtr->parentPtr->privatePtr->xOff +
winPtr->parentPtr->changes.border_width +
winPtr->changes.x;