Skip to content
Permalink
Browse files

fix filewriter crash

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14492 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 2, 2010
1 parent bba0fa8 commit 71d60681b4892863619b5ab0884996d47225d75c
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/core/qgsvectorfilewriter.cpp
@@ -435,6 +435,16 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )

OGRGeometryH mGeom2 = createEmptyGeometry( geom->wkbType() );

if ( !mGeom2 )
{
QgsDebugMsg( QString( "Failed to create empty geometry for type %1 (OGR error: %2)" ).arg( geom->wkbType() ).arg( CPLGetLastErrorMsg() ) );
mErrorMessage = QObject::tr( "Feature geometry not imported (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
mError = ErrFeatureWriteFailed;
OGR_F_Destroy( poFeature );
return false;
}

OGRErr err = OGR_G_ImportFromWkb( mGeom2, geom->asWkb(), geom->wkbSize() );
if ( err != OGRERR_NONE )
{

0 comments on commit 71d6068

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