Protect against dealloc without init

This commit is contained in:
rfm 2024-11-17 20:57:04 +00:00
parent 9e504da2df
commit 42fa1bf04a
2 changed files with 2 additions and 2 deletions

View file

@ -856,9 +856,9 @@ static NSLock *cached_proxies_gate = nil;
{
if (debug_connection)
NSLog(@"deallocating %@", self);
[self finalize];
if (GS_EXISTS_INTERNAL)
{
[self finalize];
GS_DESTROY_INTERNAL(NSConnection);
}
[super dealloc];

View file

@ -799,9 +799,9 @@ static NSOperationQueue *mainQueue = nil;
- (void) dealloc
{
[self cancelAllOperations];
if (GS_EXISTS_INTERNAL && internal->lock != nil)
{
[self cancelAllOperations];
DESTROY(internal->operations);
DESTROY(internal->starting);
DESTROY(internal->waiting);