diff options
author | yoda@etoyoc.com <hypnotoad> | 2014-08-27 13:07:52 (GMT) |
---|---|---|
committer | yoda@etoyoc.com <hypnotoad> | 2014-08-27 13:07:52 (GMT) |
commit | a10937a33382e0c56f1dfb812d0afa6f742c3cb4 (patch) | |
tree | f43a1b655ae2be577b30cbd8782dada9727107e2 | |
parent | 8d24b6ce491d01fd2bc1ee49e94ac3070f4946d7 (diff) | |
download | tk-a10937a33382e0c56f1dfb812d0afa6f742c3cb4.zip tk-a10937a33382e0c56f1dfb812d0afa6f742c3cb4.tar.gz tk-a10937a33382e0c56f1dfb812d0afa6f742c3cb4.tar.bz2 |
Fix for segfaults induced by the following script:
button .b
pack .b
update
destroy .b
button .c
update
-rw-r--r-- | macosx/tkMacOSXButton.c | 3 |
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)); |