Skip to content
Permalink
Browse files

close driver if attributes are missing

git-svn-id: http://svn.osgeo.org/qgis/trunk@6293 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Dec 21, 2006
1 parent 67f32b1 commit be3ab6f9818c97feb1391afed3fc59e09bd42fff
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/providers/grass/qgsgrassprovider.cpp
@@ -1974,6 +1974,7 @@ std::vector<QgsFeatureAttribute> *QgsGrassProvider::attributes ( int field, int
#endif

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

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

0 comments on commit be3ab6f

Please sign in to comment.
You can’t perform that action at this time.