URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14022>
Summary: Remove nil object (NSMapRemove) in SQLClient on
Mac.
Project: GNUstep
Submitted by: yjchen
Submitted on: Wed 08/03/2005 at 06:48
Category: Libraries
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
There is a bug I noticed while writing a SQLite bundle for SQLClient.
It crashes while trying to remove a nil object on Mac OSX.
Here is a patch.
*** SQLClient.m.orig Tue Aug 2 23:43:08 2005
--- SQLClient.m Tue Aug 2 23:39:02 2005
***************
*** 967,973 ****
[self disconnect];
}
RETAIN(self);
! NSMapRemove(cache, (void*)_name);
ASSIGNCOPY(_name, s);
ASSIGN(_client, [[NSProcessInfo processInfo] globallyUniqueString]);
NSMapInsert(cache, (void*)_name, (void*)self);
--- 967,974 ----
[self disconnect];
}
RETAIN(self);
! if (_name)
! NSMapRemove(cache, (void*)_name);
ASSIGNCOPY(_name, s);
ASSIGN(_client, [[NSProcessInfo processInfo] globallyUniqueString]);
NSMapInsert(cache, (void*)_name, (void*)self);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14022>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep