diff -r 436cbdf56810 -r 4585c74d809c Source/GGBLayer.m --- a/Source/GGBLayer.m Sat Jul 05 17:46:43 2008 -0700 +++ b/Source/GGBLayer.m Tue Jul 08 20:32:52 2008 -0700 @@ -56,10 +56,14 @@ _curAnimation = (id)[self animationForKey: @"animateAndBlock:"]; [self setValue: to forKeyPath: keyPath]; // animation doesn't update the property value - // Now wait for it to finish: - while( _curAnimation ) { - [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode//NSEventTrackingRunLoopMode - beforeDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]]; + if( self.presentationLayer ) { + // Now wait for it to finish: + while( _curAnimation ) { + [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode//NSEventTrackingRunLoopMode + beforeDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]]; + } + } else { + _curAnimation = nil; } }