mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Added asserts and initialized pointer before calling firstAnchestorOrThisOfType()
This commit is contained in:
@@ -51,6 +51,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimViewLinker* rimLinked = NULL;
|
||||
managedViews[i]->firstAnchestorOrThisOfType(rimLinked);
|
||||
CVF_ASSERT(rimLinked);
|
||||
|
||||
linkedViews.push_back(rimLinked);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user