Fixed segmentation fault for SetGridProperty with selected timestep

See TP#4179
p4#: 22364
This commit is contained in:
Magne Sjaastad
2013-09-09 14:33:37 +02:00
parent d3ef53285a
commit 1a8f3d2555
2 changed files with 26 additions and 1 deletions

View File

@@ -904,7 +904,7 @@ public:
qint64 bytesRead = currentClient->read((char*)(doubleValues.data()), m_bytesPerTimeStepToRead);
size_t doubleValueIndex = 0;
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = m_currentReservoir->reservoirData()->dataAccessObject(grid, m_porosityModelEnum, m_currentTimeStepNumberToRead, m_currentScalarIndex);
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = m_currentReservoir->reservoirData()->dataAccessObject(grid, m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex);
if (!cellCenterDataAccessObject.isNull())
{
for (size_t cellIdx = 0; static_cast<size_t>(cellIdx) < cellCountFromOctave; cellIdx++)