Skip to content

Commit 2bafd07

Browse files
ferdymercurydpiparo
authored andcommitted
[tree] public method should be safe against fImpl = null
as is the case with function GetReadStatus This prevents the crash on line 35 (stack trace by amadio on https://its.cern.ch/jira/browse/ROOT-11006):
1 parent 13413b5 commit 2bafd07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree/treeplayer/inc/TTreeReaderArray.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Base class of TTreeReaderArray.
3232
TDictionary* dict):
3333
TTreeReaderValueBase(reader, branchname, dict) {}
3434

35-
std::size_t GetSize() const { return fImpl->GetSize(GetProxy()); }
35+
std::size_t GetSize() const { return fImpl ? fImpl->GetSize(GetProxy()) : 0; }
3636
bool IsEmpty() const { return !GetSize(); }
3737

3838
EReadStatus GetReadStatus() const override { return fImpl ? fImpl->fReadStatus : kReadError; }

0 commit comments

Comments
 (0)