Check if callback is non nil. Fixes #340 #364. (#385)

This commit is contained in:
Aline Freitas 2017-06-02 03:37:14 -03:00 committed by Marvin W
parent 0e766d4572
commit fb3623cf35
1 changed files with 6 additions and 4 deletions

View File

@ -545,10 +545,12 @@ public class GoogleMapImpl extends IGoogleMapDelegate.Stub
@Override
public void run() {
Log.d(TAG, "Announce map loaded");
try {
callback.onMapLoaded();
} catch (RemoteException e) {
Log.w(TAG, e);
if (callback != null) {
try {
callback.onMapLoaded();
} catch (RemoteException e) {
Log.w(TAG, e);
}
}
}
}, 5000);