Guard nullpointer access

This commit is contained in:
Magne Sjaastad committed 2021-05-25 11:50:18 +02:00
1 parent 805df93aed
commit 86bdf5722a
1 file changed
+1 -1
@@ -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;
}