Guard nullpointer access

This commit is contained in:
Magne Sjaastad 2021-05-25 11:10:24 +02:00
parent 805df93aed
commit 86bdf5722a

View File

@ -160,7 +160,7 @@ RimWellPath* RicWellLogTools::selectedWellPathWithLogFile()
RimWellPath* RicWellLogTools::findWellPathWithLogFileFromSelection()
{
RimWellPath* wellPath = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPath>();
if ( wellPath->wellLogFiles().size() > 0 )
if ( wellPath && wellPath->wellLogFiles().size() > 0 )
{
return wellPath;
}