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 29, 2014
1 parent 6def4b6 commit 9f77717
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/providers/oracle/qgsoraclefeatureiterator.cpp
Original file line number Diff line number Diff line change
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 9f77717

Please sign in to comment.