Skip to content
Snippets Groups Projects
Commit a844cdce authored by Philippe Canal's avatar Philippe Canal
Browse files

Add missing protection (against corrupted files) in ReadStreamerInfos

git-svn-id: http://root.cern.ch/svn/root/trunk@40681 27541ba8-7e3a-0410-8455-c3a389f83636
parent 275c7764
No related branches found
No related tags found
No related merge requests found
......@@ -2843,7 +2843,10 @@ void TFile::ReadStreamerInfo()
TObjLink *lnk = list->FirstLink();
while (lnk) {
info = (TStreamerInfo*)lnk->GetObject();
if (info == 0) {
lnk = lnk->Next();
continue;
}
if (info->IsA() != TStreamerInfo::Class()) {
if (mode==1) {
TObject *obj = (TObject*)info;
......@@ -2865,6 +2868,11 @@ void TFile::ReadStreamerInfo()
}
// This is a quick way (instead of parsing the name) to see if this is
// the description of an STL container.
if (info->GetElements()==0) {
Warning("ReadStreamerInfo","The StreamerInfo for %s does not have a list of elements.",info->GetName());
lnk = lnk->Next();
continue;
}
TObject *element = info->GetElements()->UncheckedAt(0);
Bool_t isstl = element && strcmp("This",element->GetName())==0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment