Merge pull request #1126 from blattms/backport-of-pr-1125

Fix memory error during EclipseGrid creation with Actnum. (backport PR #1125)
This commit is contained in:
Markus Blatt
2019-10-17 20:29:25 +02:00
committed by GitHub

View File

@@ -1152,10 +1152,11 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
const std::vector<double>& coord = COORDKeyWord.getSIDoubleData();
int * actnum = nullptr;
std::vector<int> actnumVector;
if (deck.hasKeyword<ParserKeywords::ACTNUM>()) {
const auto& actnumKeyword = deck.getKeyword<ParserKeywords::ACTNUM>();
std::vector<int> actnumVector = actnumKeyword.getIntData();
actnumVector = actnumKeyword.getIntData();
actnum=actnumVector.data();
}