diff --git a/ChangeLog b/ChangeLog index 534af1ff8..13354b84f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-01-31 Doug Simons + + * Source/NSindow.m: Don't unregister delegate notifications if same delegate is set twice. + 2013-02-21 Frank Le Grand Prelimirary/basic implementation of NSCollectionView and NSCollectionViewItem. This is a work in progress. diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 09b45aa0c..6779d7e36 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -5320,6 +5320,9 @@ current key view.
*/ - (void) setDelegate: (id)anObject { + if (anObject == _delegate) + return; // don't remove previously registered notifications if delegate is unchanged! + if (_delegate) { [nc removeObserver: _delegate name: nil object: self];