Prevent potential crashes due to invalid pointers left in text

containers and layout managers when their respective layout manager
and text storage are deallocated.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35178 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2012-06-05 11:34:02 +00:00
parent d69b1eed65
commit 514393b9d6
3 changed files with 13 additions and 0 deletions

View file

@ -61,6 +61,8 @@ static NSNotificationCenter *nc = nil;
- (void) dealloc
{
[self setDelegate: nil];
[_layoutManagers makeObjectsPerformSelector: @selector(setTextStorage:)
withObject: nil];
RELEASE (_layoutManagers);
[super dealloc];
}