Commit 0cbf2395 authored by Julien Michel's avatar Julien Michel

BUG: Fixing potential bug on number of layers in dataset

parent 3c078b86
......@@ -411,8 +411,14 @@ void otb::ogr::DataSource::GetGlobalExtent(double & ulx,
OGREnvelope sExtent;
const_iterator lit = this->begin();
itkGenericExceptionMacro(<< "Cannot compute global extent because there are no layers in the DataSource");
const OGRErr res = lit->ogr().GetExtent(&sExtent,force);
if(res!= OGRERR_NONE)
itkGenericExceptionMacro(<< "Cannot retrieve extent of layer <"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment