Fixed crash with audioscrobbler.

CQTexperiment
vspader 2007-02-26 04:23:13 +00:00
parent e6f2e7dd0d
commit 083a898de6
1 changed files with 3 additions and 1 deletions

View File

@ -203,7 +203,7 @@ escapeForLastFM(NSString *string)
@synchronized([myself queue]) {
enumerator = [[myself queue] objectEnumerator];
command = [enumerator nextObject];
command = [[enumerator nextObject] retain];
[[myself queue] removeObjectIdenticalTo:command];
}
@ -213,6 +213,8 @@ escapeForLastFM(NSString *string)
port = [client connectToHost:@"localhost" port:port];
[client send:command];
[command release];
response = [client receive];
if(2 > [response length] || NSOrderedSame != [response compare:@"OK" options:NSLiteralSearch range:NSMakeRange(0,2)]) {
NSLog(@"AudioScrobbler error: %@", response);