summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXButton.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index dd4cca7..9250884 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -379,6 +379,9 @@ NSRect TkMacOSXGetButtonFrame(
if (tkwin) {
MacDrawable *macWin = (MacDrawable *) winPtr->window;
NSView *view = TkMacOSXDrawableView(macWin);
+ if(view==nil) {
+ return NSZeroRect;
+ }
CGFloat viewHeight = [view bounds].size.height;
NSRect frame = NSMakeRect(macWin->xOff, macWin->yOff,
Tk_Width(tkwin), Tk_Height(tkwin));