From 7bdc7392e096770ee73c9f63e79f10be60670932 Mon Sep 17 00:00:00 2001 From: Javier Galan Date: Tue, 13 Sep 2022 10:26:26 +0200 Subject: [PATCH] TRestRun::OpenInputFile. Preventing segmentation fault --- source/framework/core/src/TRestRun.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/framework/core/src/TRestRun.cxx b/source/framework/core/src/TRestRun.cxx index 6f68d8bf6..ad5365c33 100644 --- a/source/framework/core/src/TRestRun.cxx +++ b/source/framework/core/src/TRestRun.cxx @@ -470,7 +470,8 @@ void TRestRun::ReadInputFileMetadata() { RESTDebug << "Reading key with name : " << key->GetName() << RESTendl; RESTDebug << "Key type (class) : " << key->GetClassName() << RESTendl; - if (!TClass::GetClass(key->GetClassName())->IsLoaded()) { + if (!TClass::GetClass(key->GetClassName()) || + !TClass::GetClass(key->GetClassName())->IsLoaded()) { RESTError << "-- Class " << key->GetClassName() << " has no dictionary!" << RESTendl; RESTError << "- Any relevant REST library missing? " << RESTendl; RESTError << "- File reading will continue without loading key: " << key->GetName()