Skip to content

Commit be3ab6f

Browse files
author
rblazek
committed
close driver if attributes are missing
git-svn-id: http://svn.osgeo.org/qgis/trunk@6293 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 67f32b1 commit be3ab6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/providers/grass/qgsgrassprovider.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,7 @@ std::vector<QgsFeatureAttribute> *QgsGrassProvider::attributes ( int field, int
19741974
#endif
19751975

19761976
if ( nRecords < 1 ) {
1977+
db_close_database_shutdown_driver ( driver );
19771978
std::cerr << "No DB record" << std::endl;
19781979
return att;
19791980
}
@@ -1983,6 +1984,7 @@ std::vector<QgsFeatureAttribute> *QgsGrassProvider::attributes ( int field, int
19831984

19841985
int more;
19851986
if ( db_fetch (&databaseCursor, DB_NEXT, &more) != DB_OK ) {
1987+
db_close_database_shutdown_driver ( driver );
19861988
std::cout << "Cannot fetch DB record" << std::endl;
19871989
return att;
19881990
}

0 commit comments

Comments
 (0)