diff --git a/io/io/src/TMemFile.cxx b/io/io/src/TMemFile.cxx index 5f605521741e19e1e538854332f2d307f7751741..e87451ac35d277d924194952e2913a672a9587a5 100644 --- a/io/io/src/TMemFile.cxx +++ b/io/io/src/TMemFile.cxx @@ -194,8 +194,10 @@ TMemFile::TMemFile(const TMemFile &orig) : fD = orig.fD; // not really used, so it is okay to have the same value. fWritable = orig.fWritable; - // We intentionally allocated just one big buffer for this object. - orig.CopyTo(fBlockList.fBuffer,fSize); + if (!fExternalData) { + // We intentionally allocated just one big buffer for this object. + orig.CopyTo(fBlockList.fBuffer,fSize); + } Init(!NeedsExistingFile(optmode)); // A copy is }