From 004de1b52caab70080ca3faf766d9668212d6977 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Sat, 26 Nov 2022 10:16:56 +0100 Subject: [PATCH] prevent nullptr dereference --- LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx index dfc059ee3fe8..75c8089ba27b 100755 --- a/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx @@ -269,7 +269,7 @@ StatusCode LArRamps2Ntuple::stop() { ATH_MSG_WARNING("Failed to dyn-cast to ILArRamp to LArRampComplete. Cannot apply corrections"); m_applyCorr=false; } - if (!rampComplete->correctionsApplied()) { + if (rampComplete and !rampComplete->correctionsApplied()) { rampComplete_nc=const_cast<LArRampComplete*>(rampComplete); sc=rampComplete_nc->applyCorrections(); if (sc.isFailure()) { -- GitLab