Skip to content
Permalink
Browse files
oracle provider: fix closing of iterator in case of error
  • Loading branch information
jef-n committed Jun 29, 2014
1 parent 6def4b6 commit 9f7771778e14e387b3c930634e679288f8535502
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 9f77717

Please sign in to comment.