diff options
Diffstat (limited to 'src/model.c')
-rw-r--r-- | src/model.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model.c b/src/model.c index f98d4bc..8abbc42 100644 --- a/src/model.c +++ b/src/model.c @@ -326,7 +326,7 @@ static int model_load(ModelContext *ctx, const char *name, RenderContext *render /* Subdivide the previous face if requested */ if ( !coll && subdiv && (sscanf(line, "subdivide %f %f", &x, &y) == 2) ) { if ( type == PRIMITIVE_QUADS ) { - if ( (num_vertices % 4)==0 ) { + if ( (num_vertices > 0) && ((num_vertices % 4)==0) ) { GLfloat u, v; GLfloat v1x, v1y, v1z; GLfloat v2x, v2y, v2z; |