Index: DefaultMapLayer.java
===================================================================
--- DefaultMapLayer.java	(revision 32469)
+++ DefaultMapLayer.java	(working copy)
@@ -33,12 +33,15 @@
 import org.geotools.feature.IllegalAttributeException;
 import org.geotools.feature.SchemaException;
 import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.geotools.map.MapLayer;
 import org.geotools.map.event.MapLayerEvent;
+import org.geotools.referencing.CRS;
 import org.geotools.resources.coverage.FeatureUtilities;
 import org.geotools.styling.Style;
 import org.opengis.coverage.grid.GridCoverage;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
+import org.opengis.geometry.Envelope;
 import org.opengis.geometry.MismatchedDimensionException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.operation.TransformException;
@@ -399,12 +402,22 @@
 				MapLayerEvent.FILTER_CHANGED));
 	}
 	public ReferencedEnvelope getBounds() {
-		
+		// CRS could also be null, depends on FeatureType
 		CoordinateReferenceSystem sourceCrs = featureSource.getSchema().getCoordinateReferenceSystem();
-		ReferencedEnvelope env;
+
 		try {
-			env = new ReferencedEnvelope(featureSource.getBounds(), sourceCrs);
-			return env;
+            ReferencedEnvelope bounds = featureSource.getBounds();
+            if (null != bounds) {
+            	// returns the bounds based on features
+            	return bounds;
+            }
+            
+            if (sourceCrs != null) {
+            	// returns the envelope based on the CoordinateReferenceSystem
+            	Envelope envelope = CRS.getEnvelope(sourceCrs);
+            	return new ReferencedEnvelope(envelope);
+            }
+            
 		} catch (MismatchedDimensionException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
@@ -412,8 +425,11 @@
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-		return null;
+		
+		// return a default ReferencedEnvelope 
+		return new ReferencedEnvelope();
 	}
+	
 	// ------------------------------------------------------------------------
 	// EVENT HANDLING CODE
 	// ------------------------------------------------------------------------
