Bugfix for releasing uninitialised instance.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24463 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-02-04 09:57:20 +00:00
parent fe0f32993f
commit edcf9400aa
2 changed files with 5 additions and 1 deletions

View file

@ -8,6 +8,7 @@
* Source/NSException.m: Use non-symbolic stack trace if symbols * Source/NSException.m: Use non-symbolic stack trace if symbols
are not available. are not available.
* Source/NSIndexSet.m: Add private method for minternal use. * Source/NSIndexSet.m: Add private method for minternal use.
* Source/NSMessagePort.m: Fix error releasing uninitialised instance.
2007-01-30 Richard Frith-Macdonald <rfm@gnu.org> 2007-01-30 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1701,7 +1701,10 @@ typedef struct {
M_LOCK(messagePortLock); M_LOCK(messagePortLock);
if (NSDecrementExtraRefCountWasZero(self)) if (NSDecrementExtraRefCountWasZero(self))
{ {
NSMapRemove(messagePortMap, (void*)name); if (_internal != 0)
{
NSMapRemove(messagePortMap, (void*)name);
}
M_UNLOCK(messagePortLock); M_UNLOCK(messagePortLock);
[self dealloc]; [self dealloc];
} }