Skip to content
Permalink
Browse files
fix #3377
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14983 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 30, 2010
1 parent 73fa51c commit f7ddafce6ab394c3685948e2b9f0ed20b3c05df8
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/plugins/ogr_converter/translator.cpp
@@ -19,6 +19,7 @@
#include <QString>

#include <ogr_api.h>
#include <cpl_error.h>

Translator::Translator()
: mDstUpdate( false ), mDstLayerOverwrite( true )
@@ -201,6 +202,13 @@ bool Translator::translateLayer( OGRDataSourceH srcDs, OGRLayerH srcLayer, OGRDa
dstLayer = OGR_DS_CreateLayer( dstDs, mDstLayer.toAscii().constData(),
dstLayerSrs, geomType, 0 );
}

if ( 0 == dstLayer )
{
qWarning( QString( "Layer %1 not found and CreateLayer failed [OGR: %2]\n" ).arg( mDstLayer ).arg( CPLGetLastErrorMsg() ).toUtf8() );
return false;
}

// TODO: Append and createion options not implemented
// else if (!mDstLayerAppend)

0 comments on commit f7ddafc

Please sign in to comment.