Commit f89319a3 authored by Andrea Aime's avatar Andrea Aime Committed by Jody Garnett
Browse files

[GEOS-9124] ResourcePool can NPE while looking for WMS/WMTS cascaded layers

parent df2e9e7a
......@@ -1890,7 +1890,7 @@ public class ResourcePool {
WMSCapabilities caps = info.getStore().getWebMapServer(null).getCapabilities();
for (Layer layer : caps.getLayerList()) {
if (name.equals(layer.getName())) {
if (layer != null && name.equals(layer.getName())) {
return layer;
}
}
......@@ -1917,7 +1917,7 @@ public class ResourcePool {
caps = info.getStore().getWebMapTileServer(null).getCapabilities();
for (Layer layer : caps.getLayerList()) {
if (name.equals(layer.getName())) {
if (layer != null && name.equals(layer.getName())) {
return layer;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment