From 36c3c74d44819ba8132041dc3b4ee793c2109a69 Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Wed, 1 Oct 2003 13:09:54 +0000 Subject: [PATCH] Fixing crashes :D --- MainController.h | 1 + MainController.m | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MainController.h b/MainController.h index c6fd5f3..1245103 100755 --- a/MainController.h +++ b/MainController.h @@ -40,6 +40,7 @@ NSDate *blingDate; MTBlingController *bling; + BOOL timerUpdating; } + (MainController *)sharedController; diff --git a/MainController.m b/MainController.m index 523936c..518d86f 100755 --- a/MainController.m +++ b/MainController.m @@ -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; } } -- 2.20.1