FIX: fix crash when no sec_link

Change-Id: I41aa905b0dcac3d5b162fea5b19a1d2c6aa72b68
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li authored and Lane.Wei committed 2023-04-17 15:39:02 +08:00
1 parent aa6785bde4
commit 4174f361f1
1 file changed
+4 -1
+4 -1
View File
@@ -3888,7 +3888,10 @@ void DeviceManager::on_machine_alive(std::string json_str)
std::string printer_signal = j["dev_signal"].get<std::string>();
std::string connect_type = j["connect_type"].get<std::string>();
std::string bind_state = j["bind_state"].get<std::string>();
std::string sec_link = j["sec_link"].get<std::string>();
std::string sec_link = "";
if (j.contains("sec_link")) {
sec_link = j["sec_link"].get<std::string>();
}
MachineObject* obj;