(-size): Don't try to get the size if rep is nil.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19403 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-05-26 23:42:48 +00:00
parent cac2d857fa
commit 181eac6eeb
2 changed files with 8 additions and 1 deletions

View file

@ -510,7 +510,10 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
{
NSImageRep *rep = [self bestRepresentationForDevice: nil];
_size = [rep size];
if (rep)
_size = [rep size];
else
_size = NSZeroSize;
}
return _size;
}