diff --git a/stepmania/src/archutils/Darwin/SMMainThread.m b/stepmania/src/archutils/Darwin/SMMainThread.m index 77a7ee8025..8dbad2bb33 100644 --- a/stepmania/src/archutils/Darwin/SMMainThread.m +++ b/stepmania/src/archutils/Darwin/SMMainThread.m @@ -22,6 +22,7 @@ - (void) dealloc { + [self performOnMainThread]; [actions release]; [super dealloc]; } @@ -58,6 +59,8 @@ - (void) performOnMainThread { + if( ![actions count] ) + return; /* This can be done with an NSInvocation without the need for - (void) perform * but it just makes this complex and confusing. */ [self performSelectorOnMainThread:@selector(perform) withObject:nil waitUntilDone:YES];