summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSubwindows.c
diff options
context:
space:
mode:
authorculler <culler>2024-06-09 22:00:24 (GMT)
committerculler <culler>2024-06-09 22:00:24 (GMT)
commit06a4ba5407ebd451d8ab5d56bb06fad34f24766f (patch)
tree1989009145e5d549dcd6a71615cfbf43d0d33c16 /macosx/tkMacOSXSubwindows.c
parentdb062abb6620c7df36d50b0a5d5cb7a14b924a2c (diff)
downloadtk-06a4ba5407ebd451d8ab5d56bb06fad34f24766f.zip
tk-06a4ba5407ebd451d8ab5d56bb06fad34f24766f.tar.gz
tk-06a4ba5407ebd451d8ab5d56bb06fad34f24766f.tar.bz2
Fix crash in test suite.
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r--macosx/tkMacOSXSubwindows.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 229253b..0c4e4e4 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -317,7 +317,6 @@ XUnmapWindow(
{
MacDrawable *macWin = (MacDrawable *)window;
TkWindow *winPtr = macWin->winPtr;
- TkWindow *parentPtr = winPtr->parentPtr;
NSWindow *win = TkMacOSXGetNSWindowForDrawable(window);
if (!window) {
@@ -1087,9 +1086,12 @@ TkMacOSXInvalidateWindow(
TkMacOSXDbgMsg("%s", macWin->winPtr->pathName);
#endif
TKContentView *view = (TKContentView *)TkMacOSXGetNSViewForDrawable(macWin);
- TkMacOSXInvalClipRgns(macWin->winPtr);
- if (flag == TK_PARENT_WINDOW){
- TkMacOSXInvalClipRgns(macWin->winPtr->parentPtr);
+ TkWindow *winPtr = macWin->winPtr;
+ Tk_Window tkwin = (Tk_Window) winPtr;
+ Tk_Window parent = (Tk_Window) winPtr->parentPtr;
+ TkMacOSXInvalClipRgns(tkwin);
+ if ((flag == TK_PARENT_WINDOW) && parent){
+ TkMacOSXInvalClipRgns(parent);
}
// Here we should probably be using the damage region.
[view generateExposeEvents:[view bounds]];