FIX: fix crash in get_firmware_info
Change-Id: I26807cfc9f66f13c3b44efb24570f23817c8b829
This commit is contained in:
parent
c855cdaf54
commit
ab261089d5
2 changed files with 6 additions and 0 deletions
|
@ -2673,8 +2673,12 @@ void MachineObject::update_slice_info(std::string project_id, std::string profil
|
|||
void MachineObject::get_firmware_info()
|
||||
{
|
||||
m_firmware_valid = false;
|
||||
if (m_firmware_thread_started)
|
||||
return;
|
||||
|
||||
boost::thread update_info_thread = Slic3r::create_thread(
|
||||
[&] {
|
||||
m_firmware_thread_started = true;
|
||||
int result = 0;
|
||||
unsigned int http_code;
|
||||
std::string http_body;
|
||||
|
@ -2745,6 +2749,7 @@ void MachineObject::get_firmware_info()
|
|||
catch (...) {
|
||||
return;
|
||||
}
|
||||
m_firmware_thread_started = false;
|
||||
m_firmware_valid = true;
|
||||
}
|
||||
);
|
||||
|
|
|
@ -617,6 +617,7 @@ public:
|
|||
void update_slice_info(std::string project_id, std::string profile_id, std::string subtask_id, int plate_idx);
|
||||
|
||||
bool m_firmware_valid { false };
|
||||
bool m_firmware_thread_started { false };
|
||||
void get_firmware_info();
|
||||
bool is_firmware_info_valid();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue