diff --git a/CMakeLists.txt b/CMakeLists.txt index e220788867b7165736d2c2b178428dba85f13b5e..9b8a27efd971e8ea9be2214040a8f3a478d9528c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ ADD_DEFINITIONS( #----------------------------------------------------------------------------- # OTB version number. An even minor number corresponds to releases. SET(OTB_VERSION_MAJOR "2") -SET(OTB_VERSION_MINOR "6") +SET(OTB_VERSION_MINOR "8") SET(OTB_VERSION_PATCH "0") diff --git a/Code/IO/otbSHPVectorDataIO.txx b/Code/IO/otbSHPVectorDataIO.txx index d5f4258bf8fb76fa85346a9c53e39d22bcfe8cf9..17b8596e5f95766c6c859345d85256e91cca8409 100644 --- a/Code/IO/otbSHPVectorDataIO.txx +++ b/Code/IO/otbSHPVectorDataIO.txx @@ -714,6 +714,10 @@ namespace otb if(ogrCollection == NULL) { + if(ogrFeatures.empty()) + { + itkExceptionMacro(<<"Problem while creating FEATURE_POINT: ogrFeatures is not initialized."); + } ogrFeatures.back()->GetDefnRef()->SetGeomType(wkbPoint); ogrFeatures.back()->SetGeometry(&ogrPoint); } @@ -746,6 +750,10 @@ namespace otb if(ogrCollection == NULL) { + if(ogrFeatures.empty()) + { + itkExceptionMacro(<<"Problem while creating FEATURE_LINE: ogrFeatures is not initialized."); + } ogrFeatures.back()->GetDefnRef()->SetGeomType(wkbLineString); ogrFeatures.back()->SetGeometry(&ogrLine); } @@ -805,6 +813,10 @@ namespace otb } if(ogrCollection == NULL) { + if(ogrFeatures.empty()) + { + itkExceptionMacro(<<"Problem while creating FEATURE_POLYGON: ogrFeatures is not initialized."); + } ogrFeatures.back()->GetDefnRef()->SetGeomType(wkbPolygon); ogrFeatures.back()->SetGeometry(ogrPolygon); }