Handle null center locations.

Cloning null was causing an NPE.
This commit is contained in:
tastybento 2019-03-16 10:44:14 -07:00
parent ea1602b0f5
commit 47900fd183

View File

@ -194,7 +194,7 @@ public class Island implements DataObject {
* @return clone of the center Location
*/
public Location getCenter(){
return center.clone();
return center == null ? null : center.clone();
}
/**