From: rnv Date: Fri, 12 Dec 2008 08:44:42 +0000 (+0000) Subject: Fix crash on open old files. X-Git-Tag: TG_DumpPython_Extension_4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c7bd244010903ee3fa958655db5fef18104909c2;p=modules%2Fkernel.git Fix crash on open old files. --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index d662e03c7..64e73346a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -187,10 +187,12 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) return NULL; } - //Read and create notebook variables - hdf_notebook_vars = new HDFgroup("NOTEBOOK_VARIABLES",hdf_file); - ReadNoteBookVariables(Study,hdf_notebook_vars); - hdf_notebook_vars =0; //will be deleted by hdf_sco_group destructor + //Read and create notebook variables + if(hdf_file->ExistInternalObject("NOTEBOOK_VARIABLES")) { + hdf_notebook_vars = new HDFgroup("NOTEBOOK_VARIABLES",hdf_file); + ReadNoteBookVariables(Study,hdf_notebook_vars); + hdf_notebook_vars =0; //will be deleted by hdf_sco_group destructor + } hdf_file->CloseOnDisk(); hdf_group_study_structure = new HDFgroup("STUDY_STRUCTURE",hdf_file);