Author: rfm
Date: Sun Jun 19 09:37:58 2016
New Revision: 39877
URL: http://svn.gna.org/viewcvs/gnustep?rev=39877&view=rev
Log:
Fix retain/release error which caused a crash on removal of an old operation.
Modified:
libs/base/trunk/Source/NSOperation.m
Modified: libs/base/trunk/Source/NSOperation.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSOperation.m?rev=39877&r1=39876&r2=39877&view=diff
==============================================================================
--- libs/base/trunk/Source/NSOperation.m (original)
+++ libs/base/trunk/Source/NSOperation.m Sun Jun 19 09:37:58 2016
@@ -920,7 +920,7 @@
when = [[NSDate alloc] initWithTimeIntervalSinceNow: 5.0];
found = [internal->cond lockWhenCondition: 1 beforeDate: when];
- [when release];
+ RELEASE(when);
if (NO == found)
{
break; // Idle for 5 seconds ... exit thread.
@@ -928,7 +928,7 @@
if ([internal->starting count] > 0)
{
- op = [internal->starting objectAtIndex: 0];
+ op = RETAIN([internal->starting objectAtIndex: 0]);
[internal->starting removeObjectAtIndex: 0];
}
else
@@ -958,7 +958,7 @@
[NSThread setThreadPriority: [op threadPriority]];
[op main];
}
- [opPool release];
+ RELEASE(opPool);
}
NS_HANDLER
{
@@ -967,6 +967,7 @@
}
NS_ENDHANDLER
[op _finish];
+ RELEASE(op);
}
}
@@ -974,7 +975,7 @@
[internal->lock lock];
internal->threadCount--;
[internal->lock unlock];
- [pool release];
+ RELEASE(pool);
[NSThread exit];
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs