diff --git a/include/mp/flat/nl_expr/model_api_base.h b/include/mp/flat/nl_expr/model_api_base.h index 25ceeb104..19641dc9e 100644 --- a/include/mp/flat/nl_expr/model_api_base.h +++ b/include/mp/flat/nl_expr/model_api_base.h @@ -94,7 +94,7 @@ class BasicExprModelAPI /// Get linear part var \a i. int GetLinVar(const NLConstraint& nlc, int i) const { - assert(IsVarProper(i)); + assert(IsVarProper(nlc.GetMainCon().var(i))); return nlc.GetMainCon().var(i); }