diff --git a/Source/NSClipView.m b/Source/NSClipView.m index 91194fd1a..57a0ec9c5 100644 --- a/Source/NSClipView.m +++ b/Source/NSClipView.m @@ -91,7 +91,13 @@ static inline NSRect integralRect (NSRect rect, NSView *view) - (void) dealloc { - RELEASE(_documentView); + if (_documentView != nil) + { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + [nc removeObserver: self name: nil object: _documentView]; + RELEASE(_documentView); + } RELEASE(_cursor); RELEASE(_backgroundColor);