From 86bdf5722aa139e30e014734f4a750a73007ee87 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 25 May 2021 11:10:24 +0200 Subject: [PATCH] Guard nullpointer access --- ApplicationLibCode/Commands/RicWellLogTools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationLibCode/Commands/RicWellLogTools.cpp b/ApplicationLibCode/Commands/RicWellLogTools.cpp index b4a5d3d195..61644e66cd 100644 --- a/ApplicationLibCode/Commands/RicWellLogTools.cpp +++ b/ApplicationLibCode/Commands/RicWellLogTools.cpp @@ -160,7 +160,7 @@ RimWellPath* RicWellLogTools::selectedWellPathWithLogFile() RimWellPath* RicWellLogTools::findWellPathWithLogFileFromSelection() { RimWellPath* wellPath = caf::SelectionManager::instance()->selectedItemAncestorOfType(); - if ( wellPath->wellLogFiles().size() > 0 ) + if ( wellPath && wellPath->wellLogFiles().size() > 0 ) { return wellPath; }