mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-04 13:16:56 -06:00
#2460 Tensor vectors: Move cvf::ref of scaler mapper out to avoid nullptr exception
This commit is contained in:
1 parent
2c26ca4243
commit
0366361767
1 file changed
+1
-1
@@ -334,10 +334,10 @@ cvf::ref<cvf::Part> RivTensorResultPartMgr::createPart(const std::vector<TensorV
|
||||
|
||||
cvf::ScalarMapper* activeScalerMapper = nullptr;
|
||||
|
||||
cvf::ref<cvf::ScalarMapperDiscreteLinear> discreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
||||
auto vectorColors = m_rimReservoirView->tensorResults()->vectorColors();
|
||||
if (vectorColors == RimTensorResults::MAGENTA_BROWN_BLACK || vectorColors == RimTensorResults::WHITE_GRAY_BLACK)
|
||||
{
|
||||
cvf::ref<cvf::ScalarMapperDiscreteLinear> discreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
||||
|
||||
activeScalerMapper = discreteScalarMapper.p();
|
||||
|
||||
|
||||
Reference in new issue
Block a user