Revision: 29641
          http://sourceforge.net/p/bibdesk/svn/29641
Author:   hofman
Date:     2025-09-29 09:12:38 +0000 (Mon, 29 Sep 2025)
Log Message:
-----------
make sure index is not null before retaining

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

Modified: trunk/bibdesk/BDSKItemSearchIndexes.m
===================================================================
--- trunk/bibdesk/BDSKItemSearchIndexes.m       2025-09-28 16:08:59 UTC (rev 
29640)
+++ trunk/bibdesk/BDSKItemSearchIndexes.m       2025-09-29 09:12:38 UTC (rev 
29641)
@@ -191,7 +191,9 @@
 
 - (SKIndexRef)indexForField:(NSString *)field {
     NSParameterAssert(nil != field);
-    SKIndexRef anIndex = 
(SKIndexRef)CFRetain(CFDictionaryGetValue(searchIndexes, (CFStringRef)field));
+    SKIndexRef anIndex = (SKIndexRef)CFDictionaryGetValue(searchIndexes, 
(CFStringRef)field);
+    if (anIndex)
+        CFRetain(anIndex);
     if (CFSetContainsValue(indexesToFlush, anIndex)) {
         SKIndexFlush(anIndex);
         CFSetRemoveValue(indexesToFlush, anIndex);

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to