mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
fix for issue reported by Mathias Bauer <mathias_bauer@gmx.net>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37611 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
80f925978a
commit
bdf6dc7e23
3 changed files with 14 additions and 6 deletions
|
@ -1096,15 +1096,17 @@ cifframe_callback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
return instance;
|
||||
}
|
||||
|
||||
/* Locks receiver and returns path info on success, otherwise
|
||||
* leaves receiver munlocked and returns nil.
|
||||
/* Locks receiver and returns path info on success, otherwise leaves
|
||||
* receiver unlocked and returns nil.
|
||||
* The returned path info is retained and autoreleased in case something
|
||||
* removes it from the receiver while it's being used by the caller.
|
||||
*/
|
||||
- (GSKVOPathInfo*) lockReturningPathInfoForKey: (NSString*)key
|
||||
{
|
||||
GSKVOPathInfo *pathInfo;
|
||||
|
||||
[iLock lock];
|
||||
pathInfo = (GSKVOPathInfo*)NSMapGet(paths, (void*)key);
|
||||
pathInfo = AUTORELEASE(RETAIN((GSKVOPathInfo*)NSMapGet(paths, (void*)key)));
|
||||
if (pathInfo == nil)
|
||||
{
|
||||
[iLock unlock];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue