Skip to content

Commit 9f9a7a8

Browse files
committed
Merge remote-tracking branch 'origin/v92-bugfix' into v9-minor
2 parents baed270 + 9ee6322 commit 9f9a7a8

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
@@ -3248,7 +3248,7 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
32483248
/* constraint handlers without constraints should only be called once */
32493249
if( nconss > 0 || (!conshdlr->needscons && relaxchanged) )
32503250
{
3251-
SCIP_CONS** conss;
3251+
SCIP_CONS** conss = NULL;
32523252
SCIP_Longint oldndomchgs;
32533253
SCIP_Longint oldnprobdomchgs;
32543254
int oldncuts;
@@ -3266,7 +3266,11 @@ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol(
32663266
conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss;
32673267

32683268
/* 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+
}
32703274

32713275
oldncuts = SCIPsepastoreGetNCuts(sepastore);
32723276
oldnactiveconss = stat->nactiveconss;
@@ -3644,7 +3648,7 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
36443648
/* constraint handlers without constraints should only be called once */
36453649
if( nconss > 0 || (!conshdlr->needscons && pschanged) )
36463650
{
3647-
SCIP_CONS** conss;
3651+
SCIP_CONS** conss = NULL;
36483652
SCIP_Longint oldndomchgs;
36493653
SCIP_Longint oldnprobdomchgs;
36503654

@@ -3657,7 +3661,11 @@ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(
36573661
conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss;
36583662

36593663
/* 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+
}
36613669

36623670
oldndomchgs = stat->nboundchgs + stat->nholechgs;
36633671
oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs;

0 commit comments

Comments
 (0)