iosandroiddev / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

OverlayManager - tilesOverlay is not really optionnal #486

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
In OverlayManager, tilesOverlay was planned to be optionnal. 
But setting a null tilesOverlay in the constructor causes a null pointer 
exception: OverlayManager o = new OverlayManager(null);

What version of the product are you using? 
osmdroid 3.0.10

Please provide any additional information below.

Here is the fix in OverlayManager.class : 
public void setTilesOverlay(final TilesOverlay tilesOverlay) {
  mTilesOverlay = tilesOverlay;
  if (mTilesOverlay != null) //THE TEST TO ADD
    mTilesOverlay.setUseSafeCanvas(this.isUsingSafeCanvas());
}

Original issue reported on code.google.com by mathieu....@gmail.com on 16 Oct 2013 at 4:06

GoogleCodeExporter commented 8 years ago

Original comment by neilboyd on 18 Oct 2013 at 7:48

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1369.

Original comment by neilboyd on 18 Oct 2013 at 8:15