mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1257 Added null pointer guarding based on reports from CppCheck
This commit is contained in:
@@ -45,7 +45,7 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot = NULL;
|
||||
selection[0]->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot->trackCount() > 1)
|
||||
if (wellLogPlot && wellLogPlot->trackCount() > 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user