#1257 More null pointer guards based on CppCheck

This commit is contained in:
Magne Sjaastad
2017-02-24 16:16:58 +01:00
parent bf1f8fcbaa
commit 48599f7a94
6 changed files with 28 additions and 17 deletions

View File

@@ -235,6 +235,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
RimWellLogPlotCollection* wellLogCollection = NULL;
this->firstAncestorOrThisOfType(wellLogCollection);
CVF_ASSERT(wellLogCollection);
if (!wellLogCollection) return;
cvf::ref<RigEclipseWellLogExtractor> eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
@@ -299,6 +300,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
RimWellLogPlot* wellLogPlot;
firstAncestorOrThisOfType(wellLogPlot);
CVF_ASSERT(wellLogPlot);
if (!wellLogPlot) return;
displayUnit = wellLogPlot->depthUnit();