Author: mlytwyn
Date: Mon Aug 17 06:58:17 2015
New Revision: 38896

URL: http://svn.gna.org/viewcvs/gnustep?rev=38896&view=rev
Log:
Make sure we can invoke method

Modified:
    plugins/themes/WinUXTheme/WinNSTableHeader.m

Modified: plugins/themes/WinUXTheme/WinNSTableHeader.m
URL: 
http://svn.gna.org/viewcvs/gnustep/plugins/themes/WinUXTheme/WinNSTableHeader.m?rev=38896&r1=38895&r2=38896&view=diff
==============================================================================
--- plugins/themes/WinUXTheme/WinNSTableHeader.m        (original)
+++ plugins/themes/WinUXTheme/WinNSTableHeader.m        Mon Aug 17 06:58:17 2015
@@ -43,15 +43,16 @@
   
   if (tableView)
     {
-      NSClipView *clipView = (NSClipView*)[tableView superview];
+      // Seems like the clip view is optional(?)...
+      id superView = (NSClipView*)[tableView superview];
       
-      if (clipView != nil)
+      if (superView && ([superView 
respondsToSelector:@selector(documentVisibleRect)]))
         {
-          NSRect clipFrame = [clipView documentVisibleRect];
+          NSRect clipFrame = [superView documentVisibleRect];
           CGFloat maxWidth = NSMaxX(clipFrame);
           
           // If outside the boundaries of the table view's super (clip) view...
-          if (cellFrame.origin.x > maxWidth)
+          if (NSMinX(cellFrame) > maxWidth)
             return;
           
           // Do not exceed the bounds of the clip view...


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to