Fixing crashes :D
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Wed, 1 Oct 2003 13:09:54 +0000 (13:09 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Wed, 1 Oct 2003 13:09:54 +0000 (13:09 +0000)
MainController.h
MainController.m

index c6fd5f3..1245103 100755 (executable)
@@ -40,6 +40,7 @@
     
     NSDate *blingDate;
     MTBlingController *bling;
+    BOOL timerUpdating;
 }
 + (MainController *)sharedController;
 
index 523936c..518d86f 100755 (executable)
@@ -39,6 +39,7 @@ static MainController *sharedController;
         statusWindowController = [StatusWindowController sharedController];
         menuController = [[MenuController alloc] init];
         df = [[NSUserDefaults standardUserDefaults] retain];
+        timerUpdating = NO;
     }
     return self;
 }
@@ -202,15 +203,19 @@ static MainController *sharedController;
 
 - (void)timerUpdate
 {
-    if ( [self songChanged] ) {
+    if ( [self songChanged] && (timerUpdating != YES) ) {
         ITDebugLog(@"The song changed.");
-        [self setLatestSongIdentifier:[currentRemote playerStateUniqueIdentifier]];
+        timerUpdating = YES;
         latestPlaylistClass = [currentRemote currentPlaylistClass];
         [menuController rebuildSubmenus];
 
         if ( [df boolForKey:@"showSongInfoOnChange"] ) {
             [self performSelector:@selector(showCurrentTrackInfo) withObject:nil afterDelay:0.0];
         }
+        
+        [self setLatestSongIdentifier:[currentRemote playerStateUniqueIdentifier]];
+        
+        timerUpdating = NO;
     }
 }