Revision: 26910
          http://sourceforge.net/p/bibdesk/svn/26910
Author:   hofman
Date:     2021-09-16 22:37:38 +0000 (Thu, 16 Sep 2021)
Log Message:
-----------
add matches for file matcher on main thread, as mutable array is not thread 
safe for modifications

Modified Paths:
--------------
    trunk/bibdesk/BDSKFileMatcher.m

Modified: trunk/bibdesk/BDSKFileMatcher.m
===================================================================
--- trunk/bibdesk/BDSKFileMatcher.m     2021-09-16 22:26:08 UTC (rev 26909)
+++ trunk/bibdesk/BDSKFileMatcher.m     2021-09-16 22:37:38 UTC (rev 26910)
@@ -517,11 +517,6 @@
             
         } while (numFound && moreToFind);
         
-        if (foundMatches)
-            [matches addObject:node];
-        
-        [treeNodes release];
-        
         SKSearchCancel(search);
         CFRelease(search);
         
@@ -535,12 +530,17 @@
         
         val++;
         dispatch_async(dispatch_get_main_queue(), ^{
-            [outlineView reloadData];
+            if (foundMatches) {
+                [matches addObject:node];
+                [outlineView reloadData];
+            }
             [progressIndicator setDoubleValue:(val/max)];
         });
-        [pool release];
+        [pool drain];
     }
     
+    [treeNodes release];
+    
     if (0 == _matchFlags.shouldAbort) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [progressIndicator setDoubleValue:(1.0)];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to