@@ -3299,7 +3299,7 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
3299
3299
/* constraint handlers without constraints should only be called once */
3300
3300
if ( nconss > 0 || (!conshdlr -> needscons && relaxchanged ) )
3301
3301
{
3302
- SCIP_CONS * * conss ;
3302
+ SCIP_CONS * * conss = NULL ;
3303
3303
SCIP_Longint oldndomchgs ;
3304
3304
SCIP_Longint oldnprobdomchgs ;
3305
3305
int oldncuts ;
@@ -3317,7 +3317,11 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
3317
3317
conshdlr -> lastnusefulenfoconss = conshdlr -> nusefulenfoconss ;
3318
3318
3319
3319
/* get the array of the constraints to be processed */
3320
- conss = & (conshdlr -> enfoconss [firstcons ]);
3320
+ if ( conshdlr -> needscons )
3321
+ {
3322
+ assert (conshdlr -> enfoconss != NULL );
3323
+ conss = conshdlr -> enfoconss + firstcons ;
3324
+ }
3321
3325
3322
3326
oldncuts = SCIPsepastoreGetNCuts (sepastore );
3323
3327
oldnactiveconss = stat -> nactiveconss ;
@@ -3714,7 +3718,7 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
3714
3718
/* constraint handlers without constraints should only be called once */
3715
3719
if ( nconss > 0 || (!conshdlr -> needscons && pschanged ) )
3716
3720
{
3717
- SCIP_CONS * * conss ;
3721
+ SCIP_CONS * * conss = NULL ;
3718
3722
SCIP_Longint oldndomchgs ;
3719
3723
SCIP_Longint oldnprobdomchgs ;
3720
3724
@@ -3727,7 +3731,11 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
3727
3731
conshdlr -> lastnusefulenfoconss = conshdlr -> nusefulenfoconss ;
3728
3732
3729
3733
/* get the array of the constraints to be processed */
3730
- conss = & (conshdlr -> enfoconss [firstcons ]);
3734
+ if ( conshdlr -> needscons )
3735
+ {
3736
+ assert (conshdlr -> enfoconss != NULL );
3737
+ conss = conshdlr -> enfoconss + firstcons ;
3738
+ }
3731
3739
3732
3740
oldndomchgs = stat -> nboundchgs + stat -> nholechgs ;
3733
3741
oldnprobdomchgs = stat -> nprobboundchgs + stat -> nprobholechgs ;
0 commit comments