播放语音未读消息为空时报错的问题
authordxy <1731678236qq.com>
Tue, 19 Aug 2025 08:27:19 +0000 (16:27 +0800)
committerdxy <1731678236qq.com>
Tue, 19 Aug 2025 08:27:19 +0000 (16:27 +0800)
2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/protocol.py

index 71add71..5623e2d 100644 (file)
@@ -1344,7 +1344,8 @@ class SockMangager(Abstract):
             "msg":"修改语音消息阅读状态",
             "data":self.voice_id
         }
-        self.new_voice_list.pop(self.voice_index)
+        if len(self.new_voice_list) != 0:
+            self.new_voice_list.pop(self.voice_index)
         EventMesh.publish(WEB_CMD_ENUM.PUT_VOICE_MSG_STATE_S,put_voice_msg_state)
         pass