Revision 44618 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeature.java

View differences:

DefaultFeature.java
491 491
    public Envelope getDefaultEnvelope() {
492 492
        Envelope envelope = this.data.getDefaultEnvelope();
493 493
        if( envelope == null ) {
494
            int i = this.data.getType().getDefaultGeometryAttributeIndex();
495
            if( i<0 ) {
496
                return null;
497
            }
494 498
            Geometry geom = this.getDefaultGeometry();
495 499
            if( geom!=null ) {
496 500
                envelope = geom.getEnvelope();
......
504 508
    	Geometry geom = this.data.getDefaultGeometry();
505 509
        if( geom == null ) {
506 510
            int i = this.data.getType().getDefaultGeometryAttributeIndex();
511
            if( i<0 ) {
512
                return null;
513
            }
507 514
            Object x = this.get(i);
508 515
            if( x instanceof Geometry ) {
509 516
                geom = (Geometry) x;

Also available in: Unified diff