Skip to content
Permalink
Browse files
oracle provider: fix closing of iterator in case of error
  • Loading branch information
jef-n committed Jun 30, 2014
1 parent 99d4472 commit 87e4b074c720eeef31985e6d1b570771b5d82ebc
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/providers/oracle/qgsoraclefeatureiterator.cpp
@@ -107,8 +107,7 @@ QgsOracleFeatureIterator::QgsOracleFeatureIterator( QgsOracleFeatureSource* sour
whereClause += "(" + mSource->mSqlWhereClause + ")";
}

if ( !openQuery( whereClause ) )
return;
openQuery( whereClause );
}

QgsOracleFeatureIterator::~QgsOracleFeatureIterator()
@@ -252,10 +251,8 @@ bool QgsOracleFeatureIterator::rewind()

bool QgsOracleFeatureIterator::close()
{
if ( !mQry.isActive() )
return false;

mQry.finish();
if ( mQry.isActive() )
mQry.finish();

if ( mConnection )
mConnection->disconnect();

0 comments on commit 87e4b07

Please sign in to comment.