mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
FIX: fix crash when exiting studio
Change-Id: I91f6cde208e044aae20b40e4b79159f6cd46356c Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
d9ad79e922
commit
3c8d9be77e
2 changed files with 13 additions and 5 deletions
|
@ -2981,11 +2981,15 @@ std::map<std::string, MachineObject*> DeviceManager::get_my_machine_list()
|
|||
std::map<std::string, MachineObject*> result;
|
||||
|
||||
for (auto it = userMachineList.begin(); it != userMachineList.end(); it++) {
|
||||
if (!it->second)
|
||||
continue;
|
||||
if (!it->second->is_lan_mode_printer())
|
||||
result.insert(std::make_pair(it->first, it->second));
|
||||
}
|
||||
|
||||
for (auto it = localMachineList.begin(); it != localMachineList.end(); it++) {
|
||||
if (!it->second)
|
||||
continue;
|
||||
if (it->second->has_access_right() && it->second->is_avaliable() && it->second->is_lan_mode_printer()) {
|
||||
// remove redundant in userMachineList
|
||||
if (result.find(it->first) == result.end()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue