Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/MXDReader.java @ 133:6b80d2c7536e
Improved broken layer handling.
author | vc11884admin@VC11884.win.bsh.de |
---|---|
date | Tue, 21 Jun 2011 15:22:06 +0200 |
parents | 9f74f4d36822 |
children | 2bf35f0babd0 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MXDReader.java Mon Jun 20 17:54:09 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/MXDReader.java Tue Jun 21 15:22:06 2011 +0200 @@ -129,6 +129,9 @@ FeatureLayerReader lr = new FeatureLayerReader(layer); lr.setUtil(util); Element layerElement = lr.read(); + if (layerElement == null) { + continue; + } IFeatureRenderer renderer = ((FeatureLayer)layer).getRenderer(); IRendererReader rreader; @@ -189,7 +192,7 @@ } catch(Exception e) { invalidLayerCount++; - if(i == 0 && (i + 1) < map.getLayerCount() || + if(i == 0 && (i + 1) == map.getLayerCount() || invalidLayerCount == map.getLayerCount()) { throw new IOException( "No valid layer in MXD file." +