Fixes #1685: CPToolbar calls incorrect notification method

This fix corrects the call in CPToolbar _setWindow to `removeObserver:name:object`. Before, this was calling the non-existent `removeObserver:object`, which would raise an exception.

This was fixed by @schipmolder.
This commit is contained in:
Andrew Hankinson
2013-02-23 17:20:38 -05:00
parent 3dad330a59
commit e40138c2ee
+1 -1
View File
@@ -230,7 +230,7 @@ var CPToolbarsByIdentifier = nil,
- (void)_setWindow:(CPWindow)aWindow
{
if (_window)
[[CPNotificationCenter defaultCenter] removeObserver:self object:_window];
[[CPNotificationCenter defaultCenter] removeObserver:self name:nil object:_window];
_window = aWindow;