We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f2064e6 + b51c96d commit 8c36faaCopy full SHA for 8c36faa
src/scip/scip_copy.c
@@ -747,6 +747,7 @@ SCIP_RETCODE SCIPgetVarCopy(
747
if( !uselocalvarmap )
748
{
749
*targetvar = (SCIP_VAR*) SCIPhashmapGetImage(varmap, sourcevar);
750
+ assert(*targetvar == NULL || (*targetvar)->scip == targetscip);
751
if( *targetvar != NULL )
752
return SCIP_OKAY;
753
}
@@ -924,6 +925,7 @@ SCIP_RETCODE SCIPgetVarCopy(
924
925
SCIP_CALL( SCIPaddVar(targetscip, var) );
926
927
*targetvar = var;
928
+ assert((*targetvar)->scip == targetscip);
929
930
/* remove the variable capture which was done due to the creation of the variable */
931
SCIP_CALL( SCIPreleaseVar(targetscip, &var) );
0 commit comments