forked from xiaozhi/xiaozhi-esp32
fix display abort
This commit is contained in:
@@ -134,6 +134,9 @@ void Ssd1306Display::Unlock() {
|
|||||||
|
|
||||||
void Ssd1306Display::SetChatMessage(const std::string &role, const std::string &content) {
|
void Ssd1306Display::SetChatMessage(const std::string &role, const std::string &content) {
|
||||||
DisplayLockGuard lock(this);
|
DisplayLockGuard lock(this);
|
||||||
|
if (chat_message_label_ == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (content_right_ == nullptr) {
|
if (content_right_ == nullptr) {
|
||||||
lv_label_set_text(chat_message_label_, content.c_str());
|
lv_label_set_text(chat_message_label_, content.c_str());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user