mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Caf: Guard against crash when point of interest is not set correctly
This commit is contained in:
parent
1de088ccba
commit
c7185649ce
@ -190,7 +190,7 @@ cvf::ref<cvf::Ray> caf::TrackBallBasedNavigation::createZoomRay(int cvfXPos, int
|
||||
cvf::Camera* cam = m_viewer->mainCamera();
|
||||
ray = cam->rayFromWindowCoordinates(cvfXPos, cvfYPos);
|
||||
|
||||
if (cam->projection() == cvf::Camera::ORTHO)
|
||||
if (ray.notNull() && cam->projection() == cvf::Camera::ORTHO)
|
||||
{
|
||||
cvf::Vec3d camDir = cam->direction();
|
||||
cvf::Plane focusPlane;
|
||||
|
Loading…
Reference in New Issue
Block a user