std::string aDir = SALOMEDSImpl_Tool::GetDirFromPath(Res);
- bool aResult = (ASCIIfileState[0]=='A')?
+ bool aResult = true;
+ if(aStreamFile && aStreamSize > 0 ) {
+ aResult = (ASCIIfileState[0]=='A')?
aDriver->LoadASCII(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'):
aDriver->Load(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M');
+ }
if(aStreamFile != NULL) delete []aStreamFile;
aNbFiles++;
}
+ if ( aNbFiles == 0 ) return (new SALOMEDS::TMPFile);
aBufferSize += 4; //4 bytes for a number of the files that will be written to the stream;
unsigned char* aBuffer = new unsigned char[aBufferSize];
if(aBuffer == NULL)