Salome HOME
Implementation of the "20830: EDF 1357 GUI : Hide/Show Icon"
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_StudyBuilder.cxx
index d42e08dfc77ac7ff553649d0e06a3ab5186536cc..f02b2bd946bea9b8c8e2ffaf8c0cf0473cce4249 100644 (file)
@@ -360,9 +360,12 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO,
 
       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; 
 
@@ -553,7 +556,7 @@ bool SALOMEDSImpl_StudyBuilder::RemoveAttribute(const SALOMEDSImpl_SObject& anOb
   Lab.ForgetAttribute (SALOMEDSImpl_SObject::GetGUID(aTypeOfAttribute));
     
   _doc->SetModified(true);  
-  _study->modifySO_Notification(anObject);
+  _study->modifySO_Notification(anObject,0);
     
   return true;
 }