[6.1.0]fix bug of close screen to operate null map instance

This commit is contained in:
zhongchao
2023-09-26 18:46:29 +08:00
parent f285ee7071
commit d11f55bbec
2 changed files with 1 additions and 2 deletions

View File

@@ -349,8 +349,6 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
CallerAutoPilotStatusListenerManager.removeListener(TAG)
CallerRequestActivityHandleManager.removeListener(TAG)
mogoMapListenerHandler.unregisterHostMapListener(TAG)
val mapUIController = getMapUIController()
mapUIController?.destroy()
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, false)
d(SceneConstant.M_HMI + TAG, "destroy.")
ContextHolderUtil.releaseContext()

View File

@@ -47,6 +47,7 @@ class MogoMap private constructor() {
fun clear(instance: String = DEFAULT) {
if (mapCache.containsKey(instance)) {
mapCache[instance]?.uiController?.destroy()
mapCache.remove(instance)
} else {
CallerLogger.e(