fix bugly #426022 npe异常

This commit is contained in:
lianglihui
2021-06-02 10:37:11 +08:00
parent 17373903a9
commit e04affb82f

View File

@@ -35,7 +35,9 @@ public abstract class MogoBaseMapView extends FrameLayout implements ILifeCycle
private void init( Context context ) {
addMapView( context );
MogoMap.getInstance().init( getContext(), mMapView.getMap() );
if (mMapView != null){
MogoMap.getInstance().init( getContext(), mMapView.getMap() );
}
}
protected abstract void addMapView( Context context );