diff options
-rw-r--r-- | src/gallium/auxiliary/util/u_prim.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h index 366801545ed..a09c315cc0a 100644 --- a/src/gallium/auxiliary/util/u_prim.h +++ b/src/gallium/auxiliary/util/u_prim.h @@ -145,6 +145,9 @@ u_prims_for_vertices(unsigned prim, unsigned num) { const struct u_prim_vertex_count *info = u_prim_vertex_count(prim); + assert(info); + assert(info->incr != 0); + if (num < info->min) return 0; |