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

Fix ROOT-7487, make TObject::Clone always proceed.

If gDirectory is a nullptr use gROOT.  TObject::Clone uses
TDirectory[File]::CloneObject and the TDirectoryFile object
actually change the behavior (set gFile to nullptr) in a way
that probably require significant surgery to avoid using the
virtual function.
parent 4ce57ef4
No related branches found
No related tags found
No related merge requests found
...@@ -146,8 +146,8 @@ TObject *TObject::Clone(const char *) const ...@@ -146,8 +146,8 @@ TObject *TObject::Clone(const char *) const
if (gDirectory) { if (gDirectory) {
return gDirectory->CloneObject(this); return gDirectory->CloneObject(this);
} else { } else {
Fatal("Clone","No gDirectory set"); // Some of the streamer (eg. roofit's) expect(ed?) a valid gDirectory during streaming.
return 0; return gROOT->Clone();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment