Revision: 14745
http://sourceforge.net/p/skim-app/code/14745
Author: hofman
Date: 2024-11-25 16:43:23 +0000 (Mon, 25 Nov 2024)
Log Message:
-----------
Copy the block just to be sure, as we don't use ARC to retain the block I can't
see the documentation to be conclusive whether the block will be copied
implicitly and moved to the heap (even though it seems to be)
Modified Paths:
--------------
trunk/SKDocumentController.m
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2024-11-24 16:36:24 UTC (rev 14744)
+++ trunk/SKDocumentController.m 2024-11-25 16:43:23 UTC (rev 14745)
@@ -669,7 +669,7 @@
NSArray *nextURLs = count > 1 ? [urls subarrayWithRange:NSMakeRange(1,
count - 1)] : nil;
[self openDocumentWithContentsOfURL:fileURL display:NO
completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError
*error){
if (document) {
- void (^block)(BOOL) = ^(BOOL success){
+ void (^block)(BOOL) = [^(BOOL success){
if (documentWasAlreadyOpen == NO)
[document close];
if (success && nextURLs)
@@ -676,7 +676,7 @@
[self printDocumentsWithContentsOfURLs:nextURLs
withSettings:printSettings showPrintPanels:showPrintPanels
completionHandler:completionHandler];
else
completionHandler(success);
- };
+ } copy];
[document printDocumentWithSettings:printSettings
showPrintPanel:showPrintPanels delegate:self
didPrintSelector:@selector(document:didPrint:contextInfo:) contextInfo:(void
*)CFBridgingRetain(block)];
} else {
if (error)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit