Skip to content
Snippets Groups Projects
Commit 24830a3a authored by Rene Brun's avatar Rene Brun
Browse files

Fix reverse_null. coverity CID 10731

git-svn-id: http://root.cern.ch/svn/root/trunk@35876 27541ba8-7e3a-0410-8455-c3a389f83636
parent 8618ade2
No related branches found
No related tags found
No related merge requests found
......@@ -168,8 +168,9 @@ TFileIter::TFileIter(const TFileIter &dst) : TListIter()
fCursorPosition(-1), fOwnTFile(dst.fOwnTFile)
{
// Copy ctor can be used with the "read only" files only.
assert(!fRootFile->IsWritable());
if (fRootFile && fOwnTFile && !fRootFile->IsWritable()) {
//the next statement is illegal, spotted by coverity "Dereferencing pointer "this->fRootFile". (Deref happens because this is a virtual function call.)
//assert(!fRootFile->IsWritable());
if (fRootFile && fOwnTFile) {
// Reopen the file
if (fRootFile->InheritsFrom(TFile::Class()))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment