From 2032f8f4fc0645d2aa2f80e4e3dab10f44b387fc Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 15 Jan 2006 04:43:50 +0000 Subject: [PATCH] On deallocation, perform the actions. --- stepmania/src/archutils/Darwin/SMMainThread.m | 3 +++ 1 file changed, 3 insertions(+) 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];