mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 03:00:37 +00:00
Don't reference ivar after the object has been freed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d115384ecc
commit
1878af00d9
2 changed files with 16 additions and 8 deletions
|
@ -1411,10 +1411,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[_className isEqualToString: _originalClassName] == NO)
|
||||
{
|
||||
Class newCellClass = [newClass cellClass];
|
||||
if(newCellClass != [NSCell class])
|
||||
{
|
||||
result = [[newCellClass alloc] initWithCoder: coder];
|
||||
}
|
||||
if (newCellClass != [NSCell class])
|
||||
{
|
||||
result = [[newCellClass alloc] initWithCoder: coder];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -1432,15 +1432,21 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
// build the real object...
|
||||
if ([NSClassSwapper isInInterfaceBuilder] == YES)
|
||||
{
|
||||
{
|
||||
[self instantiateRealObject: coder withClassName: _originalClassName];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self instantiateRealObject: coder withClassName: _className];
|
||||
}
|
||||
}
|
||||
|
||||
RELEASE(self);
|
||||
{
|
||||
id object;
|
||||
|
||||
object = RETAIN(_template);
|
||||
RELEASE(self);
|
||||
return AUTORELEASE(object);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1449,7 +1455,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSStringFromClass([coder class])];
|
||||
}
|
||||
|
||||
return _template;
|
||||
return self;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue