mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
CppCheck : Several fixes
Add missing initializers Guard potential null pointer access
This commit is contained in:
@@ -325,9 +325,18 @@ void RiuSelectionChangedHandler::updateResultInfo(const RiuSelectionItem* itemAd
|
||||
if (selItem->type() == RiuSelectionItem::INTERSECTION_SELECTION_OBJECT)
|
||||
{
|
||||
const Riu2dIntersectionSelectionItem* wrapperSelItem = dynamic_cast<Riu2dIntersectionSelectionItem*>(selItem);
|
||||
intersectionView = wrapperSelItem->view();
|
||||
if (wrapperSelItem && wrapperSelItem->eclipseSelectionItem()) selItem = wrapperSelItem->eclipseSelectionItem();
|
||||
else if (wrapperSelItem && wrapperSelItem->geoMechSelectionItem()) selItem = wrapperSelItem->geoMechSelectionItem();
|
||||
if (wrapperSelItem)
|
||||
{
|
||||
intersectionView = wrapperSelItem->view();
|
||||
if (wrapperSelItem->eclipseSelectionItem())
|
||||
{
|
||||
selItem = wrapperSelItem->eclipseSelectionItem();
|
||||
}
|
||||
else if (wrapperSelItem->geoMechSelectionItem())
|
||||
{
|
||||
selItem = wrapperSelItem->geoMechSelectionItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selItem->type() == RiuSelectionItem::ECLIPSE_SELECTION_OBJECT)
|
||||
|
||||
Reference in New Issue
Block a user