Double variable to setlatitude error :    NullPointerException this error happens when i try to set `location2.setLatitude(latitudeclick);`
I test the app and i receive when i click the value out of latitudeclick 





  

    @Override
                                    public void onResult(PlaceBuffer places) {
                                        if (places.getCount() == 1) {
                                            localizacao =  (places.get(0).getLatLng());
                                            Double latitudeclick = localizacao.latitude;
                                            Double longitudeclick = localizacao.longitude;
                                            Location location2 = null;
                                            location2.setLatitude(latitudeclick);
                                            location2.setLatitude(longitudeclick);
        
        
        
                                        }