mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3300 Fix crash when loading formation indices as part of a project file.
* Rename structGrid() to getOrCreateStructGrid() to make it obvious that it allocates internally.
This commit is contained in:
@@ -141,7 +141,7 @@ QString RiuFemResultTextBuilder::geometrySelectionText(QString itemSeparator)
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
size_t k = 0;
|
||||
if (geomData->femParts()->part(m_gridIndex)->structGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k))
|
||||
if (geomData->femParts()->part(m_gridIndex)->getOrCreateStructGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k))
|
||||
{
|
||||
// Adjust to 1-based Eclipse indexing
|
||||
i++;
|
||||
@@ -224,7 +224,7 @@ QString RiuFemResultTextBuilder::formationDetails()
|
||||
{
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
geomData->femParts()->part(m_gridIndex)->structGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k);
|
||||
geomData->femParts()->part(m_gridIndex)->getOrCreateStructGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user