Revision: 28679
          http://sourceforge.net/p/bibdesk/svn/28679
Author:   hofman
Date:     2024-01-25 23:11:53 +0000 (Thu, 25 Jan 2024)
Log Message:
-----------
Don't check whether item owner was non-nil when setting to nil, as it would 
already be nil when the owner is deallocating due to weak reference

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

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2024-01-25 23:08:33 UTC (rev 28678)
+++ trunk/bibdesk/BibItem.m     2024-01-25 23:11:53 UTC (rev 28679)
@@ -529,18 +529,16 @@
 #pragma mark Document
 
 - (void)setOwner:(id<BDSKOwner>)newOwner {
-    if (owner != newOwner) {
-        if (owner && newOwner == nil && [downloads count] > 0) {
-            [downloads makeObjectsPerformSelector:@selector(cancel)];
-            [downloads removeAllObjects];
-        }
-               owner = newOwner;
-        if (owner) {
-            // we don't reset the macroResolver when the owner is set to nil, 
because we use the macroResolver to know the macroResolver used for the fields, 
so we can prevent items from being added to another document
-            [self setMacroResolver:[owner macroResolver]];
-            [self createFilesArray];
-        }
-       }
+    if (newOwner == nil && [downloads count] > 0) {
+        [downloads makeObjectsPerformSelector:@selector(cancel)];
+        [downloads removeAllObjects];
+    }
+    owner = newOwner;
+    if (owner) {
+        // we don't reset the macroResolver when the owner is set to nil, 
because we use the macroResolver to know the macroResolver used for the fields, 
so we can prevent items from being added to another document
+        [self setMacroResolver:[owner macroResolver]];
+        [self createFilesArray];
+    }
 }
 
 - (void)setMacroResolver:(BDSKMacroResolver *)newMacroResolver {

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