[QGIS Commit] r14983 - trunk/qgis/src/plugins/ogr_converter
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Dec 30 10:36:30 EST 2010
Author: jef
Date: 2010-12-30 07:36:30 -0800 (Thu, 30 Dec 2010)
New Revision: 14983
Modified:
trunk/qgis/src/plugins/ogr_converter/translator.cpp
Log:
fix #3377
Modified: trunk/qgis/src/plugins/ogr_converter/translator.cpp
===================================================================
--- trunk/qgis/src/plugins/ogr_converter/translator.cpp 2010-12-29 20:27:03 UTC (rev 14982)
+++ trunk/qgis/src/plugins/ogr_converter/translator.cpp 2010-12-30 15:36:30 UTC (rev 14983)
@@ -19,6 +19,7 @@
#include <QString>
#include <ogr_api.h>
+#include <cpl_error.h>
Translator::Translator()
: mDstUpdate( false ), mDstLayerOverwrite( true )
@@ -201,6 +202,13 @@
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)
More information about the QGIS-commit
mailing list