From 8d245e5cd722fa1b299de1e2345ca167d414457f Mon Sep 17 00:00:00 2001 From: seandeelywoods Date: Wed, 27 Aug 2014 13:07:52 +0000 Subject: Fix for segfaults induced by the following script: button .b pack .b update destroy .b button .c update FossilOrigin-Name: 02f369ec275f3ef007cd075b389d239100736765 --- macosx/tkMacOSXButton.c | 3 +++ 1 file changed, 3 insertions(+) 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)); -- cgit v0.12