System : Added asserts and initialized pointer before calling firstAnchestorOrThisOfType()

This commit is contained in:
Magne Sjaastad
2015-10-26 10:14:45 +01:00
parent 01224dd5e6
commit 930209f527
5 changed files with 5 additions and 6 deletions

View File

@@ -51,6 +51,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked)
{
RimViewLinker* rimLinked = NULL;
managedViews[i]->firstAnchestorOrThisOfType(rimLinked);
CVF_ASSERT(rimLinked);
linkedViews.push_back(rimLinked);
}

View File

@@ -80,10 +80,10 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
{
RimWellLogFileChannel* wellLog = selection[wlIdx];
RimWellPath* wellPath;
RimWellPath* wellPath = NULL;
wellLog->firstAnchestorOrThisOfType(wellPath);
RimWellLogFile* wellLogFile;
RimWellLogFile* wellLogFile = NULL;
wellLog->firstAnchestorOrThisOfType(wellLogFile);
if (wellLogFile)
{