소스 검색

fix runtime exceptions

Felix Paul Kühne 10 년 전
부모
커밋
2e90ee50c6
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Sources/VLCDownloadViewController.m

+ 3 - 3
Sources/VLCDownloadViewController.m

@@ -274,7 +274,7 @@
                                                      delegate:self
                                             cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", nil)
                                             otherButtonTitles:nil];
-    [alert show];
+    [alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:NO];
 }
 
 - (void)progressUpdatedTo:(CGFloat)percentage receivedDataSize:(CGFloat)receivedDataSize  expectedDownloadSize:(CGFloat)expectedDownloadSize
@@ -348,12 +348,12 @@
     _FTPDownloadRequest = nil;
     [self downloadEnded];
 
-    VLCAlertView * alert = [[VLCAlertView alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"ERROR_NUMBER", nil), request.error.errorCode]
+    VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"ERROR_NUMBER", nil), request.error.errorCode]
                                                        message:request.error.message
                                                       delegate:self
                                              cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", nil)
                                              otherButtonTitles:nil];
-    [alert show];
+    [alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:NO];
 }
 
 #pragma mark - table view data source