From f35ed03a69b3dd04b2d68e95fb3bdffa8d10c06b Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Wed, 2 Aug 1995 15:39:31 +0000 Subject: [PATCH] ([MallocAddress -dealloc]): Check for object in dictionary before removing. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@509 72102866-910b-0410-8b05-ffd578937521 --- Source/MallocAddress.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/MallocAddress.m b/Source/MallocAddress.m index b3c1882d2..b64430f5a 100644 --- a/Source/MallocAddress.m +++ b/Source/MallocAddress.m @@ -62,7 +62,8 @@ static Dictionary* mallocAddresses; - (void) dealloc { - [mallocAddresses removeElementAtKey:address]; + if ([[self class] objectForAddress:address]) + [mallocAddresses removeElementAtKey:address]; OBJC_FREE(address); [super dealloc]; }