Fixup for dealloc of uninitialised instances

This commit is contained in:
rfm 2024-11-17 16:55:54 +00:00
parent 75049ec22e
commit f12eabad50

View file

@ -193,7 +193,7 @@ static void *queuePriorityCtxt = (void*)"queuePriority";
{ {
/* Only clean up if ivars have been initialised /* Only clean up if ivars have been initialised
*/ */
if (GS_EXISTS_INTERNAL) if (GS_EXISTS_INTERNAL && internal->lock != nil)
{ {
NSOperation *op; NSOperation *op;
@ -211,7 +211,7 @@ static void *queuePriorityCtxt = (void*)"queuePriority";
RELEASE(internal->completionBlock); RELEASE(internal->completionBlock);
GS_DESTROY_INTERNAL(NSOperation); GS_DESTROY_INTERNAL(NSOperation);
} }
[super dealloc]; DEALLOC
} }
- (NSArray *) dependencies - (NSArray *) dependencies
@ -568,7 +568,7 @@ static void *queuePriorityCtxt = (void*)"queuePriority";
- (void) dealloc - (void) dealloc
{ {
RELEASE(_executionBlocks); RELEASE(_executionBlocks);
[super dealloc]; DEALLOC
} }
- (NSArray *) executionBlocks - (NSArray *) executionBlocks
@ -810,7 +810,7 @@ static NSOperationQueue *mainQueue = nil;
DESTROY(internal->lock); DESTROY(internal->lock);
GS_DESTROY_INTERNAL(NSOperationQueue); GS_DESTROY_INTERNAL(NSOperationQueue);
} }
[super dealloc]; DEALLOC
} }
- (id) init - (id) init