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
This commit is contained in:
Nicola Pero 2001-02-09 18:52:29 +00:00
parent 5c3409760d
commit c8a8a98dab

View file

@ -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];
}
}
}