summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXButton.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 9250884..bd5cedd 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -376,6 +376,9 @@ NSRect TkMacOSXGetButtonFrame(
MacButton *macButtonPtr = (MacButton *) butPtr;
Tk_Window tkwin = butPtr->tkwin;
TkWindow *winPtr = (TkWindow *) tkwin;
+ if(tkwin==0xffffffff || tkwin==0xffffffff00000000) {
+ return NSZeroRect;
+ }
if (tkwin) {
MacDrawable *macWin = (MacDrawable *) winPtr->window;
NSView *view = TkMacOSXDrawableView(macWin);