Skip to content
Permalink
Browse files

fix warning

  • Loading branch information
jef-n committed Nov 30, 2013
1 parent d334b46 commit 9cc3c5cc7694ac3505fb6f9c5c26ff59e2a30490
Showing with 10 additions and 5 deletions.
  1. +10 −5 src/core/qgscoordinatetransform.cpp
@@ -952,21 +952,26 @@ bool QgsCoordinateTransform::datumTransformCrsInfo( int datumTransform, int& eps
}

int srcCrsId, destCrsId;
if ( sqlite3_step( stmt ) == SQLITE_ROW )
if ( sqlite3_step( stmt ) != SQLITE_ROW )
{
epsgNr = sqlite3_column_int( stmt, 0 );
srcCrsId = sqlite3_column_int( stmt, 1 );
destCrsId = sqlite3_column_int( stmt, 2 );
sqlite3_finalize( stmt );
sqlite3_close( db );
return false;
}

epsgNr = sqlite3_column_int( stmt, 0 );
srcCrsId = sqlite3_column_int( stmt, 1 );
destCrsId = sqlite3_column_int( stmt, 2 );

QgsCoordinateReferenceSystem srcCrs;
srcCrs.createFromOgcWmsCrs( QString( "EPSG:%1" ).arg( srcCrsId ) );
srcProjection = srcCrs.description();
QgsCoordinateReferenceSystem destCrs;
destCrs.createFromOgcWmsCrs( QString( "EPSG:%1" ).arg( destCrsId ) );
dstProjection = destCrs.description();

sqlite3_finalize( stmt ); sqlite3_close( db );
sqlite3_finalize( stmt );
sqlite3_close( db );
return true;
}

0 comments on commit 9cc3c5c

Please sign in to comment.
You can’t perform that action at this time.