Crash in our App fix#1096
Crash in our App fix#1096lelandrichardson merged 1 commit intoreact-native-maps:masterfrom thegdznet:master
Conversation
java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.Projection com.google.android.gms.maps.GoogleMap.getProjection()' on a null object reference at com.airbnb.android.react.maps.AirMapView$13.run(AirMapView.java:643) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5289) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.ja va:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
|
lgtm /cc @felipecsl |
| LatLngBoundsUtils.BoundsAreDifferent(bounds, lastBoundsEmitted)) { | ||
| Projection projection = map.getProjection(); | ||
| VisibleRegion region = (projection != null) ? projection.getVisibleRegion() : null; | ||
| LatLngBounds bounds = (region != null) ? region.latLngBounds : null; |
There was a problem hiding this comment.
nit: you don't need the parenthesis around projection != null and region != null
|
Many thanx to accept my pull request. Do You know when the changes will be reflected to master? Concerning the parenthesis, they are there only for visibility. You can remove them if You prefer. |
|
Thanks for this! Will be cutting a new release wit this in it soon |
|
I may be wrong but the stacktrace says that the GoogleMap object is null, not the Projection object. |
|
I am also having the same problem with the latest release. |
|
I've created another Pull request for this issue, you can find it here #1469 |
Crash in our App fix
java.lang.NullPointerException: Attempt to invoke virtual method
'com.google.android.gms.maps.Projection
com.google.android.gms.maps.GoogleMap.getProjection()' on a null object
reference
at com.airbnb.android.react.maps.AirMapView$13.run(AirMapView.java:643)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5289)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.ja
va:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)