Guard null pointer access

This commit is contained in:
Magne Sjaastad
2020-04-07 15:06:38 +02:00
committed by Gaute Lindkvist
parent 9041bc80fa
commit 5a561054bf

View File

@@ -200,7 +200,10 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
if ( auto intersectionView = dynamic_cast<Rim2dIntersectionView*>( rimView ) ) if ( auto intersectionView = dynamic_cast<Rim2dIntersectionView*>( rimView ) )
{ {
pickedPositionInUTM = intersectionView->transformToUtm( pickedPositionInUTM ); if ( intersectionView->flatIntersectionPartMgr() )
{
pickedPositionInUTM = intersectionView->transformToUtm( pickedPositionInUTM );
}
} }
double measuredDepth = wellPathSourceInfo->measuredDepth( wellPathTriangleIndex, pickedPositionInUTM ); double measuredDepth = wellPathSourceInfo->measuredDepth( wellPathTriangleIndex, pickedPositionInUTM );