From 3e6cef284a3be2853a446a51a33ed6b6eb2e5989 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 10 Dec 2021 18:56:18 -0500
Subject: [PATCH] AsgTools: Fix gcc12 warning.

gcc12 warns about comparing this to nullptr, since this being null
is undefined behavior.

Just remove the check.  If this is null we'll anyway crash on the next line.
---
 Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc b/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc
index 9959f172d3c..767167958c3 100644
--- a/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc
+++ b/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ASGTOOLS_ANATOOLHANDLE_ICC
@@ -198,7 +198,6 @@ namespace asg
     if (!(x)) { std::cerr << __FILE__ << ":" << __LINE__ << ": invariant violated: " << #x << std::endl; std::abort(); }
 
     // General requirements
-    CHECK_INVARIANT (&*this != nullptr);
     CHECK_INVARIANT (m_handleUser != nullptr);
     CHECK_INVARIANT (m_name == m_config.name());
 
-- 
GitLab