Skip to content

Commit dbba347

Browse files
committed
Merge remote-tracking branch 'origin/v9-minor'
2 parents 21dea2d + 9f9a7a8 commit dbba347

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/scip/cons.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,7 +3299,7 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
32993299
/* constraint handlers without constraints should only be called once */
33003300
if( nconss > 0 || (!conshdlr->needscons && relaxchanged) )
33013301
{
3302-
SCIP_CONS** conss;
3302+
SCIP_CONS** conss = NULL;
33033303
SCIP_Longint oldndomchgs;
33043304
SCIP_Longint oldnprobdomchgs;
33053305
int oldncuts;
@@ -3317,7 +3317,11 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
33173317
conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss;
33183318

33193319
/* 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+
}
33213325

33223326
oldncuts = SCIPsepastoreGetNCuts(sepastore);
33233327
oldnactiveconss = stat->nactiveconss;
@@ -3714,7 +3718,7 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
37143718
/* constraint handlers without constraints should only be called once */
37153719
if( nconss > 0 || (!conshdlr->needscons && pschanged) )
37163720
{
3717-
SCIP_CONS** conss;
3721+
SCIP_CONS** conss = NULL;
37183722
SCIP_Longint oldndomchgs;
37193723
SCIP_Longint oldnprobdomchgs;
37203724

@@ -3727,7 +3731,11 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
37273731
conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss;
37283732

37293733
/* 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+
}
37313739

37323740
oldndomchgs = stat->nboundchgs + stat->nholechgs;
37333741
oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs;

0 commit comments

Comments
 (0)