google map crash
<p>My google map s getting crashed when i select the current location button using this code</p>

<pre><code>if (v == locateMeButton) {
            LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
            if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
                showGPSDisabledAlert();
            } else {
                List&lt;String&gt; providers = locationManager.getProviders(true);
                Location location = null;
                for (int i = providers.size() - 1; i &gt;= 0; i--) {
                    location = locationManager.getLastKnownLocation(providers.get(i));
                    if (location != null){
                        break;
                    }
                }
                if (location != null) {
                    Float p1=Float.parseFloat(String.valueOf(location.getLatitude()));
                    Float p2=(Float.parseFloat(String.valueOf(location.getLongitude())));
                    int lat = (int) (p1 * 1E6);
                    int lon = (int) (p2 * 1E6);
                    GeoPoint geoPoint = new GeoPoint(lat, lon);

                    Map&lt;String,String&gt; mp=new HashMap&lt;String, String&gt;();
                    mp.put("latitude", String.valueOf(location.getLatitude()));
                    mp.put("longitude", String.valueOf(location.getLongitude()));
                    FlurryAgent.onEvent("Locations", mp);

                    OverlayItem overlayItem = new OverlayItem(geoPoint, null, null);
                    itemizedPosOverlay.clear();
                    itemizedPosOverlay.addOverlay(overlayItem);
                    mapOverlays.remove(itemizedPosOverlay);
                    mapOverlays.add(itemizedPosOverlay);
                    mapView.getController().animateTo(geoPoint);
                } else {
                    Toast.makeText(InfoMapView.this, "Unable To Find Current Location",
                        Toast.LENGTH_LONG).show();
                }
            }
        }
</code></pre>

<p>the log cat is as follows:</p>

<pre><code>: FATAL EXCEPTION: main
11-01 12:51:48.420: E/AndroidRuntime(24123): java.lang.ArrayIndexOutOfBoundsException
11-01 12:51:48.420: E/AndroidRuntime(24123):    at java.util.ArrayList.get(ArrayList.java:313)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at com.countdown.tabs.InfoMapView.moreInfo(InfoMapView.java:153)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at com.countdown.map.MyItemizedOverlay.onInfoWindowTap(MyItemizedOverlay.java:55)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at com.countdown.map.InfoWindowItemizedOverlay$1.onClick(InfoWindowItemizedOverlay.java:78)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at android.view.View.performClick(View.java:2408)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at android.view.View$PerformClick.run(View.java:8816)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at android.os.Handler.handleCallback(Handler.java:587)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at android.os.Handler.dispatchMessage(Handler.java:92)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at android.os.Looper.loop(Looper.java:123)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at android.app.ActivityThread.main(ActivityThread.java:4633)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at java.lang.reflect.Method.invokeNative(Native Method)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at java.lang.reflect.Method.invoke(Method.java:521)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-01 12:51:48.420: E/AndroidRuntime(24123):    at dalvik.system.NativeStart.main(Native Method)
11-01 12:51:48.430: W/ActivityManager(171):   Force finishing activity net.timessquareball.app/com.countdown.TabBarControllerActivity
11-01 12:51:48.580: W/AudioFlinger(95): write blocked for 170 msecs, 1209 delayed writes, thread 0xbb50
</code></pre>
