[Schmitzm-commits] r556 - branches/1.0-gt2-2.6/src/skrueger/geotools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 24 13:56:12 CET 2009


Author: alfonx
Date: 2009-11-24 13:56:09 +0100 (Tue, 24 Nov 2009)
New Revision: 556

Modified:
   branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java
Log:
Added NPE checks when stMapAra with Envelope


Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java	2009-11-24 09:17:22 UTC (rev 555)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java	2009-11-24 12:56:09 UTC (rev 556)
@@ -643,9 +643,9 @@
 			@Override
 			public void componentResized(final ComponentEvent e) {
 
-				// Seems to be called twice with the same size.. 
+				// Seems to be called twice with the same size..
 				if (oldVisibleRect != null
-						&& oldVisibleRect.equals(getVisibleRect())){
+						&& oldVisibleRect.equals(getVisibleRect())) {
 					LOGGER.info("skipping resize.");
 					return;
 				}
@@ -1712,6 +1712,10 @@
 	}
 
 	public boolean setMapArea(final Envelope newMapArea) {
+		if (newMapArea == null)
+			return false;
+		if (getMapContext()
+				.getCoordinateReferenceSystem() == null) return false;
 		return setMapArea(new ReferencedEnvelope(newMapArea, getMapContext()
 				.getCoordinateReferenceSystem()));
 	}



More information about the Schmitzm-commits mailing list