diff options
author | hypnotoad <yoda@etoyoc.com> | 2014-08-27 13:07:52 (GMT) |
---|---|---|
committer | hypnotoad <yoda@etoyoc.com> | 2014-08-27 13:07:52 (GMT) |
commit | a005af2cae512fc901d06236dc97190523de6bb5 (patch) | |
tree | 19a93b6b3c564cff846a7c09ed812b4253ef451a /macosx/tkMacOSXButton.c | |
parent | d7317334ddd8285bf5474b22aa66e5f025e401df (diff) | |
download | tk-a005af2cae512fc901d06236dc97190523de6bb5.zip tk-a005af2cae512fc901d06236dc97190523de6bb5.tar.gz tk-a005af2cae512fc901d06236dc97190523de6bb5.tar.bz2 |
Fix for segfaults induced by the following script:
button .b
pack .b
update
destroy .b
button .c
update
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-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)); |