Skip to content

Commit

Permalink
Merge pull request #39895 from perrotta/dealWithMissingFiles
Browse files Browse the repository at this point in the history
Deal with cases in which file is a nullptr in DQMRootSource.cc
  • Loading branch information
cmsbuild authored Nov 2, 2022
2 parents c9c6459 + ecb7f8c commit 8801a99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DQMServices/FwkIO/plugins/DQMRootSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ std::shared_ptr<edm::FileBlock> DQMRootSource::readFile_() {
m_openFiles.reserve(numFiles);

for (auto& fileitem : m_catalog.fileCatalogItems()) {
TFile* file;
TFile* file = nullptr;
std::string pfn;
std::string lfn;
std::list<std::string> exInfo;
Expand Down Expand Up @@ -556,7 +556,7 @@ std::shared_ptr<edm::FileBlock> DQMRootSource::readFile_() {
}
} //end loop over names of the file

if (!isGoodFile && m_skipBadFiles)
if (!file || (!isGoodFile && m_skipBadFiles))
continue;

std::unique_ptr<std::string> guid{file->Get<std::string>(kCmsGuid)};
Expand Down

0 comments on commit 8801a99

Please sign in to comment.