@@ -3248,7 +3248,7 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
3248
3248
/* constraint handlers without constraints should only be called once */
3249
3249
if ( nconss > 0 || (!conshdlr -> needscons && relaxchanged ) )
3250
3250
{
3251
- SCIP_CONS * * conss ;
3251
+ SCIP_CONS * * conss = NULL ;
3252
3252
SCIP_Longint oldndomchgs ;
3253
3253
SCIP_Longint oldnprobdomchgs ;
3254
3254
int oldncuts ;
@@ -3266,7 +3266,11 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
3266
3266
conshdlr -> lastnusefulenfoconss = conshdlr -> nusefulenfoconss ;
3267
3267
3268
3268
/* get the array of the constraints to be processed */
3269
- conss = & (conshdlr -> enfoconss [firstcons ]);
3269
+ if ( conshdlr -> needscons )
3270
+ {
3271
+ assert (conshdlr -> enfoconss != NULL );
3272
+ conss = conshdlr -> enfoconss + firstcons ;
3273
+ }
3270
3274
3271
3275
oldncuts = SCIPsepastoreGetNCuts (sepastore );
3272
3276
oldnactiveconss = stat -> nactiveconss ;
@@ -3644,7 +3648,7 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
3644
3648
/* constraint handlers without constraints should only be called once */
3645
3649
if ( nconss > 0 || (!conshdlr -> needscons && pschanged ) )
3646
3650
{
3647
- SCIP_CONS * * conss ;
3651
+ SCIP_CONS * * conss = NULL ;
3648
3652
SCIP_Longint oldndomchgs ;
3649
3653
SCIP_Longint oldnprobdomchgs ;
3650
3654
@@ -3657,7 +3661,11 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
3657
3661
conshdlr -> lastnusefulenfoconss = conshdlr -> nusefulenfoconss ;
3658
3662
3659
3663
/* get the array of the constraints to be processed */
3660
- conss = & (conshdlr -> enfoconss [firstcons ]);
3664
+ if ( conshdlr -> needscons )
3665
+ {
3666
+ assert (conshdlr -> enfoconss != NULL );
3667
+ conss = conshdlr -> enfoconss + firstcons ;
3668
+ }
3661
3669
3662
3670
oldndomchgs = stat -> nboundchgs + stat -> nholechgs ;
3663
3671
oldnprobdomchgs = stat -> nprobboundchgs + stat -> nprobholechgs ;
0 commit comments