Skip to content

Commit

Permalink
Fix unnecessarily fussy close() for QgsMsSqlFeatureIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 19, 2017
1 parent 6f3ebde commit 7cd8e38
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/providers/mssql/qgsmssqlfeatureiterator.cpp
Expand Up @@ -425,14 +425,8 @@ bool QgsMssqlFeatureIterator::close()
if ( mClosed )
return false;

if ( mQuery )
if ( mQuery && mQuery->isActive() )
{
if ( !mQuery->isActive() )
{
QgsDebugMsg( "QgsMssqlFeatureIterator::close on inactive query" );
return false;
}

mQuery->finish();
}

Expand Down

0 comments on commit 7cd8e38

Please sign in to comment.