From f16979b6cb01c8a0ebb24e2fdab661d6b631796a Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Fri, 13 Aug 2021 11:24:11 +0800 Subject: [PATCH] fixed crash --- .../mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt index 06ff0ac3e1..a6db2b4e57 100644 --- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt +++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/map/ObuRecognizedResultDrawer.kt @@ -201,11 +201,11 @@ class ObuRecognizedResultDrawer() { .controlAngle(true) .resName(mMarkerCachesResMd5Values[resIdVal]) .icon3DRes(resId) - .rotate(cvxRvInfoIndInfo.basic_info.heading.toFloat()) + .rotate(if (cvxRvInfoIndInfo.basic_info != null) cvxRvInfoIndInfo.basic_info.heading.toFloat() else 0f) .position( MogoLatLng( - cvxRvInfoIndInfo.basic_info.position.latitude, - cvxRvInfoIndInfo.basic_info.position.longitude + if (cvxRvInfoIndInfo.basic_info != null && cvxRvInfoIndInfo.basic_info.position != null) cvxRvInfoIndInfo.basic_info.position.latitude else 0.0, + if (cvxRvInfoIndInfo.basic_info != null && cvxRvInfoIndInfo.basic_info.position != null) cvxRvInfoIndInfo.basic_info.position.longitude else 0.0 ) )