修复电话死机问题 1002/1 1002/head
authorhcj <1224667075@qq.com>
Sat, 21 Sep 2024 11:07:10 +0000 (19:07 +0800)
committerhcj <1224667075@qq.com>
Sat, 21 Sep 2024 11:07:10 +0000 (19:07 +0800)
code/sdk/application/wearable/nativeabilityfwk/include/Ability.h

index e88cdfd..56cea10 100755 (executable)
@@ -161,9 +161,17 @@ public:
     }
 
     bool make_phone_push(uint16_t preSlice) { 
-        uint8_t top_id= backStack_.top();
-        if(top_id!=preSlice)
-        backStack_.push(preSlice);
+        if(backStack_.empty())
+        {
+            backStack_.push(preSlice);
+        }
+        else
+        {
+            uint8_t top_id= backStack_.top();
+            if(top_id!=preSlice)
+            backStack_.push(preSlice);
+        }
+       
         return false;
     }