Skip to content

Commit

Permalink
Merge pull request root-project#82 from smuzaffar/cms/a79eb8a
Browse files Browse the repository at this point in the history
Protect TTree ctor against null gDirectory
  • Loading branch information
smuzaffar committed May 29, 2015
2 parents 4443527 + 693cbc7 commit 8b56d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tree/tree/src/TTree.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ TTree::TTree(const char* name, const char* title, Int_t splitlevel /* = 99 */)
// be able to choose to not do this like we
// can with a histogram.
fDirectory = gDirectory;
fDirectory->Append(this);
if (fDirectory) fDirectory->Append(this);

fBranches.SetOwner(kTRUE);

Expand Down

0 comments on commit 8b56d80

Please sign in to comment.