Skip to content

Commit

Permalink
Better fix for crs bug
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 14, 2008
1 parent 8008185 commit 05c8c1e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/core/qgsspatialrefsys.cpp
Expand Up @@ -125,9 +125,6 @@ QgsSpatialRefSys::QgsSpatialRefSys(const QgsSpatialRefSys &srs)
// Assignment operator
QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
{
OSRDestroySpatialReference( mSRS );
mSRS = OSRNewSpatialReference(NULL);

if (&srs != this)
{
mSrsId = srs.mSrsId;
Expand All @@ -141,10 +138,8 @@ QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
mIsValidFlag = srs.mIsValidFlag;
if(mIsValidFlag)
{
char *proj4src = NULL;
OSRExportToProj4(srs.mSRS, &proj4src);
OSRImportFromProj4(mSRS, proj4src);
CPLFree(proj4src);
OSRDestroySpatialReference(mSRS);
mSRS = OSRClone(srs.mSRS);
}
}
return *this;
Expand Down

0 comments on commit 05c8c1e

Please sign in to comment.