We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d75eaff commit 8e781b4Copy full SHA for 8e781b4
src/server/qgswfsserver.cpp
@@ -1474,7 +1474,15 @@ QDomDocument QgsWFSServer::transaction( const QString& requestBody )
1474
mTypeName = typeNameElem.tagName();
1475
1476
layerList = mConfigParser->mapLayerFromTypeName( mTypeName );
1477
- currentLayer = layerList.at( 0 );
+ // Could be empty!
1478
+ if ( layerList.count() > 0 )
1479
+ {
1480
+ currentLayer = layerList.at( 0 );
1481
+ }
1482
+ else
1483
1484
+ throw QgsMapServiceException( "RequestNotWellFormed", QString( "Wrong TypeName: %1" ).arg( mTypeName ) );
1485
1486
1487
QgsVectorLayer* layer = qobject_cast<QgsVectorLayer*>( currentLayer );
1488
// it's a vectorlayer and defined by the administrator as a WFS layer
0 commit comments