For most drivers this if statement is always going to fail so check the constant value first.
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
{
struct vbo_context *vbo = vbo_context(ctx);
- if ((ib != NULL) &&
- ctx->Const.PrimitiveRestartInSoftware &&
- ctx->Array._PrimitiveRestart) {
+ if (ctx->Const.PrimitiveRestartInSoftware &&
+ ctx->Array._PrimitiveRestart &&
+ (ib != NULL)) {
/* Handle primitive restart in software */
vbo_sw_primitive_restart(ctx, prim, nr_prims, ib, NULL);
} else {