Skip to content
Permalink
Browse files

fix #1915

git-svn-id: http://svn.osgeo.org/qgis/trunk@11539 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Sep 2, 2009
1 parent 1f05829 commit 6bea923d755a3f294e847880911c5c2b5f119c2a
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -373,7 +373,7 @@ bool QgsOgrProvider::nextFeature( QgsFeature& feature )
while (( fet = OGR_L_GetNextFeature( ogrLayer ) ) != NULL )
{
// skip features without geometry
if ( OGR_F_GetGeometryRef( fet ) == NULL && !mFetchFeaturesWithoutGeom )
if ( !mFetchFeaturesWithoutGeom && OGR_F_GetGeometryRef( fet ) == NULL )
{
OGR_F_Destroy( fet );
continue;
@@ -389,6 +389,12 @@ bool QgsOgrProvider::nextFeature( QgsFeature& feature )
{
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );

if ( geom == 0 )
{
OGR_F_Destroy( fet );
continue;
}

// get the wkb representation
unsigned char *wkb = new unsigned char[OGR_G_WkbSize( geom )];
OGR_G_ExportToWkb( geom, ( OGRwkbByteOrder ) QgsApplication::endian(), wkb );

0 comments on commit 6bea923

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