Skip to content

Commit

Permalink
postgres: close connection when cursor can't be opened (fixes #10119)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 1, 2014
1 parent c94297a commit 779bf5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )
if ( !mConn->openCursor( mCursorName, query ) )
{
// reloading the fields might help next time around
rewind();
// TODO how to cleanly force reload of fields? P->loadFields();
close();
return false;
}

Expand Down

0 comments on commit 779bf5f

Please sign in to comment.