Bug report #1233

EPSG code assigned to temporary object

Added by Mateusz Loskot - about 16 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:C++ Plugins
Affected QGIS version: Regression?:No
Operating System:OS X Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11293

Description

In file [source:trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp@9108#L100 qgswfssourceselect.cpp], lines 100-105 look like this:

int [[ProjectCRS]] = -1;
if(projectRefSys.isValid())
{
   long [[ProjectCRS]] = projectRefSys.epsg();
}

The value returned from epsg() function is assigned to temporary ProjectCRS - local in scope bounded by parenthesis - that overrides the ProjectCRS variable assigned in outer scope.

It's very likely a logical bug.

Associated revisions

Revision 3da81a90
Added by Jürgen Fischer about 16 years ago

fix #1233 (spotted by mloskot)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9113 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision d307c805
Added by Jürgen Fischer about 16 years ago

fix #1233 (spotted by mloskot)

git-svn-id: http://svn.osgeo.org/qgis/trunk@9113 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Jürgen Fischer about 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Replying to mloskot:

It's very likely a logical bug.

I agree. Good spotting. Fixed in d307c805 (SVN r9114)

#2 Updated by Anonymous about 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF