Przeglądaj źródła

Prevent PolycodePlayer from crashing on close

Ivan Safrin 13 lat temu
rodzic
commit
d90fec55b8
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      Player/Contents/Platform/Darwin/MyDocument.mm

+ 5 - 2
Player/Contents/Platform/Darwin/MyDocument.mm

@@ -121,15 +121,18 @@ NSMutableAttributedString *str = [[NSMutableAttributedString alloc ]initWithStri
 	}
 }
 
-- (void)close
+- (void)canCloseDocumentWithDelegate:(id)delegate shouldCloseSelector:(SEL)shouldCloseSelector contextInfo:(void *)contextInfo
 {
 	[timer invalidate];
 	[timer release];	
 	delete player;
 	delete playerProxy;
-	[super close];
+	
+	[super canCloseDocumentWithDelegate:delegate shouldCloseSelector:shouldCloseSelector contextInfo:contextInfo];
+
 }
 
+
 - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
 {
     // Insert code here to write your document to data of the specified type. If the given outError != NULL, ensure that you set *outError when returning nil.