#1257 More null pointer guards based on CppCheck

This commit is contained in:
Magne Sjaastad
2017-02-27 14:01:18 +01:00
parent bf1f8fcbaa
commit 48599f7a94
6 changed files with 28 additions and 17 deletions
@@ -351,6 +351,8 @@ void RimIntersectionBox::updateBoxManipulatorGeometry()
RimView* rimView = nullptr;
this->firstAncestorOrThisOfType(rimView);
if (!rimView) return;
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
m_boxManipulator->setOrigin(transForm->transformToDisplayCoord(boxOrigin().translation()));
@@ -468,10 +470,12 @@ void RimIntersectionBox::initAfterRead()
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::slotScheduleRedraw()
{
RimView* rimView = nullptr;
RimView* rimView = NULL;
this->firstAncestorOrThisOfType(rimView);
rimView->scheduleCreateDisplayModelAndRedraw();
if (rimView)
{
rimView->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
@@ -516,12 +520,7 @@ void RimIntersectionBox::rebuildGeometryAndScheduleCreateDisplayModel()
{
m_intersectionBoxPartMgr = nullptr;
RimView* rimView = NULL;
this->firstAncestorOrThisOfType(rimView);
if (rimView)
{
rimView->scheduleCreateDisplayModelAndRedraw();
}
slotScheduleRedraw();
}
//--------------------------------------------------------------------------------------------------