From: isn Date: Fri, 27 Nov 2015 12:35:07 +0000 (+0300) Subject: Merge branch 'BR_LAND_COVER_MAP' of ssh://git.salome-platform.org/modules/hydro into... X-Git-Tag: v1.5^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=81ec820167fa9115167af7f7cfc41530a38bd6a5;hp=a02c04b9d092485d58fa206a33f7bea84e983279;p=modules%2Fhydro.git Merge branch 'BR_LAND_COVER_MAP' of ssh://git.salome-platform.org/modules/hydro into BR_LAND_COVER_MAP --- diff --git a/src/HYDROData/HYDROData_ShapeFile.cxx b/src/HYDROData/HYDROData_ShapeFile.cxx index 559fd739..93a75c2a 100644 --- a/src/HYDROData/HYDROData_ShapeFile.cxx +++ b/src/HYDROData/HYDROData_ShapeFile.cxx @@ -115,7 +115,7 @@ void HYDROData_ShapeFile::Export(const QString& aFileName, const Handle_HYDRODat if (bCheckLinear && !aLCM->CheckLinear()) return; // - SHPHandle hSHPHandle; + SHPHandle hSHPHandle = NULL; if ( !aLCM.IsNull() && !aLCM->IsEmpty()) { hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_POLYGON ); @@ -127,7 +127,7 @@ void HYDROData_ShapeFile::Export(const QString& aFileName, const Handle_HYDRODat aNonExpList.append(aLCM->GetName() + "_" + QString::number(It.Index())); } } - if (hSHPHandle->nRecords > 0) + if (hSHPHandle && hSHPHandle->nRecords > 0) SHPClose( hSHPHandle ); else {