From 3ba301f56e8557cd50f002fc65239aeaf45fa98d Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 13 Feb 2020 13:52:01 +0100 Subject: [PATCH] #5550 Python : Fix crash for case.set_grid_property --- ApplicationCode/GrpcInterface/RiaGrpcPropertiesService.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ApplicationCode/GrpcInterface/RiaGrpcPropertiesService.cpp b/ApplicationCode/GrpcInterface/RiaGrpcPropertiesService.cpp index ac31bf7616..eaca842a6c 100644 --- a/ApplicationCode/GrpcInterface/RiaGrpcPropertiesService.cpp +++ b/ApplicationCode/GrpcInterface/RiaGrpcPropertiesService.cpp @@ -274,6 +274,12 @@ protected: size_t timeStepIndex, RigEclipseResultAddress resVarAddr ) override { + auto resultValues = caseData->results( porosityModel )->modifiableCellScalarResult( resVarAddr, timeStepIndex ); + if ( resultValues->empty() ) + { + resultValues->resize( caseData->grid( gridIndex )->cellCount() ); + } + m_resultAccessor = RigResultAccessorFactory::createFromResultAddress( caseData, gridIndex, porosityModel, timeStepIndex, resVarAddr ); m_resultModifier =