Fixed assertion on loading model with 0 faces.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5658 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2013-03-24 09:39:37 +00:00
parent 6bc09b20d9
commit a32d957d20

View File

@ -233,7 +233,8 @@ OOINLINE void AddTriangle(GeometryData *data, Triangle tri)
- (id) initWithCapacity:(NSUInteger)capacity
{
NSParameterAssert(capacity > 0 && capacity < UINT32_MAX);
NSParameterAssert(capacity < UINT32_MAX);
if (capacity == 0) capacity = 1; // Happens for models with no faces.
if ((self = [super init]))
{