Skip to content

Commit

Permalink
oracle provider: fix closing of iterator in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 30, 2014
1 parent 99d4472 commit 87e4b07
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/providers/oracle/qgsoraclefeatureiterator.cpp
Expand Up @@ -107,8 +107,7 @@ QgsOracleFeatureIterator::QgsOracleFeatureIterator( QgsOracleFeatureSource* sour
whereClause += "(" + mSource->mSqlWhereClause + ")";
}

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

QgsOracleFeatureIterator::~QgsOracleFeatureIterator()
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 87e4b07

Please sign in to comment.