CppCheck : Avoid potential null pointer access

This commit is contained in:
Magne Sjaastad
2017-09-07 20:33:17 +02:00
parent ffb7e42b0f
commit 8ecfaa2ea7
2 changed files with 5 additions and 10 deletions

View File

@@ -321,6 +321,9 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
{
caf::SelectionManager::instance()->setSelectedItem(well);
RiuSelectionItem* selItem = new RiuSimWellSelectionItem(eclipseWellSourceInfo->well(), m_currentPickPositionInDomainCoords, eclipseWellSourceInfo->branchIndex());
RiuSelectionManager::instance()->setSelectedItem(selItem, RiuSelectionManager::RUI_TEMPORARY);
commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicShowWellAllocationPlotFeature";
commandIds << "RicPlotProductionRateFeature";
@@ -328,10 +331,6 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
commandIds << "RicShowContributingWellsFeature";
commandIds << "Separator";
commandIds << "RicNewSimWellIntersectionFeature";
RiuSelectionItem* selItem = new RiuSimWellSelectionItem(eclipseWellSourceInfo->well(), m_currentPickPositionInDomainCoords, eclipseWellSourceInfo->branchIndex());
RiuSelectionManager::instance()->setSelectedItem(selItem, RiuSelectionManager::RUI_TEMPORARY);
commandIds << "RicPlotProductionRateFeature";
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
commandIds << "RicNewSimWellFractureAtPosFeature";