From 8ea055079a9547d262163919c55286995afdf21a Mon Sep 17 00:00:00 2001 From: nico Date: Fri, 9 Feb 2001 18:52:29 +0000 Subject: [PATCH] Fix for nil superview on solaris git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9120 72102866-910b-0410-8b05-ffd578937521 --- Source/NSTableView.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 1e5960c0f..25cb35605 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -2099,8 +2099,6 @@ byExtendingSelection: (BOOL)flag - (void) noteNumberOfRowsChanged { - NSRect superviewBounds; // Get this *after* [self setFrame:] - _numberOfRows = [_dataSource numberOfRowsInTableView: self]; [self setFrame: NSMakeRect (_frame.origin.x, _frame.origin.y, @@ -2109,11 +2107,15 @@ byExtendingSelection: (BOOL)flag /* If we are shorter in height than the enclosing clipview, we should redraw us now. */ - superviewBounds = [_super_view bounds]; - if ((superviewBounds.origin.x <= _frame.origin.x) - && (NSMaxY (superviewBounds) >= NSMaxY (_frame))) + if (_super_view != nil) { - [self setNeedsDisplay: YES]; + NSRect superviewBounds; // Get this *after* [self setFrame:] + superviewBounds = [_super_view bounds]; + if ((superviewBounds.origin.x <= _frame.origin.x) + && (NSMaxY (superviewBounds) >= NSMaxY (_frame))) + { + [self setNeedsDisplay: YES]; + } } }