Skip to content

Commit

Permalink
Fix use of uninitialized values when no ellipsoid set (fix #11848)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 14, 2014
1 parent d61bf1f commit e568493
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -785,6 +785,12 @@ double QgsDistanceArea::getQbar( double x )

void QgsDistanceArea::computeAreaInit()
{
//don't try to perform calculations if no ellipsoid
if ( mEllipsoid == GEO_NONE )
{
return;
}

double a2 = ( mSemiMajor * mSemiMajor );
double e2 = 1 - ( a2 / ( mSemiMinor * mSemiMinor ) );
double e4, e6;
Expand Down

0 comments on commit e568493

Please sign in to comment.