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 | 6804321c4f8b7f5b231eae3c512352a86472d09e (patch) | |
tree | 19a93b6b3c564cff846a7c09ed812b4253ef451a /macosx | |
parent | a3595bb9ab74fc20988bb3d32edde227c68ef378 (diff) | |
download | tk-6804321c4f8b7f5b231eae3c512352a86472d09e.zip tk-6804321c4f8b7f5b231eae3c512352a86472d09e.tar.gz tk-6804321c4f8b7f5b231eae3c512352a86472d09e.tar.bz2 |
Fix for segfaults induced by the following script:
button .b
pack .b
update
destroy .b
button .c
update
Diffstat (limited to 'macosx')
-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)); |