Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 f7ddafc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/plugins/ogr_converter/translator.cpp
Expand Up @@ -19,6 +19,7 @@
#include <QString>

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

Translator::Translator()
: mDstUpdate( false ), mDstLayerOverwrite( true )
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit f7ddafc

Please sign in to comment.