diff options
author | dgp <dgp@users.sourceforge.net> | 2014-08-27 15:35:19 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-08-27 15:35:19 (GMT) |
commit | f6a5d06ec35c31a3c7b0b060788e50f367480cf8 (patch) | |
tree | b15211137315a312fec3c7380fda208bfbccd014 | |
parent | ffde386176f4a359aab3850c82745e11c8afa14d (diff) | |
parent | 22bc8117e933613b01991f5ec62d5e7a64a63551 (diff) | |
download | tk-f6a5d06ec35c31a3c7b0b060788e50f367480cf8.zip tk-f6a5d06ec35c31a3c7b0b060788e50f367480cf8.tar.gz tk-f6a5d06ec35c31a3c7b0b060788e50f367480cf8.tar.bz2 |
Stop segfaults on Mac OSX after [$button destroy].
-rw-r--r-- | macosx/tkMacOSXButton.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXMenubutton.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 9896971..95611d0 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -187,6 +187,7 @@ TkpDestroyButton( TkButton *butPtr) { MacButton *macButtonPtr = (MacButton *) butPtr; + [macButtonPtr->button setTag:(NSInteger)-1]; TkMacOSXMakeCollectableAndRelease(macButtonPtr->button); TkMacOSXMakeCollectableAndRelease(macButtonPtr->selectImage); diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index eaa444a..abb2c6e 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.c @@ -127,6 +127,7 @@ TkpDestroyMenuButton( TkMenuButton *mbPtr) { MacMenuButton *macButtonPtr = (MacMenuButton *) mbPtr; + [macButtonPtr->button setTag:(NSInteger)-1]; TkMacOSXMakeCollectableAndRelease(macButtonPtr->button); } |