Skip to content

Commit e0a19f5

Browse files
author
mhugent
committed
More save handling for WMS requests. Added an error string although there is string freeze, because the string is not at a visible place in the gui. Fixes bug #1434
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9751 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2c02b7e commit e0a19f5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/providers/wms/qgswmsprovider.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ QImage* QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth,
379379
crsKey = "CRS";
380380
}
381381

382+
int dcpTypeSize = mCapabilities.capability.request.getMap.dcpType.size();
383+
if(dcpTypeSize < 1)
384+
{
385+
mError = tr("Could not determine URL for GetMap from the WMS capabilities response");
386+
return 0;
387+
}
388+
382389
QString url = prepareUri( mCapabilities.capability.request.getMap.dcpType.front().http.get.onlineResource.xlinkHref );
383390

384391
url += "SERVICE=WMS";

0 commit comments

Comments
 (0)