Revision: 2582
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2582&view=rev
Author:   hofman
Date:     2007-07-29 02:38:47 -0700 (Sun, 29 Jul 2007)

Log Message:
-----------
Don't check delegate before removing trackingrects from tables, as it may not 
be valid anymore.

Modified Paths:
--------------
    trunk/SKFindTableView.m
    trunk/SKOutlineView.m

Modified: trunk/SKFindTableView.m
===================================================================
--- trunk/SKFindTableView.m     2007-07-28 19:34:35 UTC (rev 2581)
+++ trunk/SKFindTableView.m     2007-07-29 09:38:47 UTC (rev 2582)
@@ -18,13 +18,12 @@
 }
 
 - (void)removeTrackingRects {
-    if ([[self delegate] 
respondsToSelector:@selector(tableView:shouldTrackTableColumn:row:)] == NO)
-        return;
-    
-    CFIndex idx = CFArrayGetCount(trackingRects);
-    while(idx--)
-        [self 
removeTrackingRect:(NSTrackingRectTag)CFArrayGetValueAtIndex(trackingRects, 
idx)];
-    CFArrayRemoveAllValues(trackingRects);
+    if (trackingRects) {
+        CFIndex idx = CFArrayGetCount(trackingRects);
+        while(idx--)
+            [self 
removeTrackingRect:(NSTrackingRectTag)CFArrayGetValueAtIndex(trackingRects, 
idx)];
+        CFArrayRemoveAllValues(trackingRects);
+    }
 }
 
 - (void)rebuildTrackingRects {

Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m       2007-07-28 19:34:35 UTC (rev 2581)
+++ trunk/SKOutlineView.m       2007-07-29 09:38:47 UTC (rev 2582)
@@ -72,13 +72,12 @@
 }
 
 - (void)removeTrackingRects {
-    if ([[self delegate] 
respondsToSelector:@selector(outlineView:shouldTrackTableColumn:item:)] == NO)
-        return;
-    
-    CFIndex idx = CFArrayGetCount(trackingRects);
-    while(idx--)
-        [self 
removeTrackingRect:(NSTrackingRectTag)CFArrayGetValueAtIndex(trackingRects, 
idx)];
-    CFArrayRemoveAllValues(trackingRects);
+    if (trackingRects) {
+        CFIndex idx = CFArrayGetCount(trackingRects);
+        while(idx--)
+            [self 
removeTrackingRect:(NSTrackingRectTag)CFArrayGetValueAtIndex(trackingRects, 
idx)];
+        CFArrayRemoveAllValues(trackingRects);
+    }
 }
 
 - (void)rebuildTrackingRects {


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to