Merge pull request #998 from totto82/bugfix_wellgroup

BUGFIX. Comparison with null pointer
This commit is contained in:
Atgeirr Flø Rasmussen 2016-04-15 13:16:23 +02:00
commit b6e381d627

View File

@ -766,9 +766,10 @@ namespace Opm
} else if (well_potentials.size() > 0) { // default: calculate guide rates from well potentials
// Note: Modification of the guide rate using GUIDERAT is not supported
const WellsGroupInterface& group = *wellnode.getParent();
// only set the guide rates if there is a parent group with valied control
if (&group != NULL) {
if (wellnode.getParent() != nullptr) {
const WellsGroupInterface& group = *wellnode.getParent();
if ( well->isProducer(timeStep) ) {
// The guide rates is calculated based on the group control
// Currently only supporting WRAT, ORAT and GRAT.