|
@@ -360,6 +360,11 @@ int Vect_build_ogr(struct Map_info *Map, int build)
|
|
|
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);
|
|
|
|