From 98f80c25911ed896876ebf51728277e6078b8dce Mon Sep 17 00:00:00 2001
From: Klaus Rabbertz <klaus.rabbertz@cern.ch>
Date: Mon, 9 Dec 2024 18:07:34 +0100
Subject: [PATCH] First fix didn't compile: try this one.

---
 .../fastnlotoolkit/include/fastnlotk/read_steer.h    | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h b/v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h
index 3af31028..ee989116 100644
--- a/v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h
+++ b/v2.6/toolkit/fastnlotoolkit/include/fastnlotk/read_steer.h
@@ -597,19 +597,23 @@ public:
       return read_steer::Steering(steerID)->getstcol(label,column); }
    // check existence of value
    static bool getexist(const std::string& label, std::string steerID=read_steer::stdID ){
-      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      //      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      if ( read_steer::instances==NULL ) return false;
       if ( read_steer::instances->count(steerID) == 0 ) return false;
       return read_steer::Steering(steerID)->exist(label);}
    static bool getarrayexist(const std::string& label, std::string steerID=read_steer::stdID ){
-      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      //      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      if ( read_steer::instances==NULL ) return false;
       if ( read_steer::instances->count(steerID) == 0 ) return false;
       return read_steer::Steering(steerID)->arrayexist(label);}
    static bool getarraycontainkey(const std::string& key, const std::string& label, std::string steerID=read_steer::stdID ){
-      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      //      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      if ( read_steer::instances==NULL ) return false;
       if ( read_steer::instances->count(steerID) == 0 ) return false;
       return read_steer::Steering(steerID)->arraycontainkey(key, label);}
    static void arraypushback_steer(const std::string& value, const std::string& label, std::string steerID=read_steer::stdID ){
-      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      //      if ( read_steer::instances==NULL ) read_steer::instances = new std::map<string,read_steer*>();
+      if ( read_steer::instances==NULL ) return;
       if ( read_steer::instances->count(steerID) == 0 ) return;
       read_steer::Steering(steerID)->arraypushback(value, label);}
    // add values
-- 
GitLab