[GRASS-SVN] r47855 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 23 12:23:31 EDT 2011
Author: martinl
Date: 2011-08-23 09:23:31 -0700 (Tue, 23 Aug 2011)
New Revision: 47855
Modified:
grass/trunk/lib/vector/Vlib/build_ogr.c
Log:
vlib: don't build when no OGR layer available
Modified: grass/trunk/lib/vector/Vlib/build_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_ogr.c 2011-08-23 14:35:47 UTC (rev 47854)
+++ grass/trunk/lib/vector/Vlib/build_ogr.c 2011-08-23 16:23:31 UTC (rev 47855)
@@ -360,6 +360,11 @@
Map->fInfo.ogr.offset_num = 0;
Map->fInfo.ogr.offset_alloc = 0;
+ if (!Map->fInfo.ogr.layer) {
+ G_warning(_("Empty OGR layer, nothing to build"));
+ return 0;
+ }
+
if (OGR_L_TestCapability(Map->fInfo.ogr.layer, OLCTransactions))
OGR_L_CommitTransaction(Map->fInfo.ogr.layer);
More information about the grass-commit
mailing list