FIX:fixed studio crash caused by HTTP request blocking

jira:[STUDIO-3849]

Change-Id: I6348af96014e80da6b720da48239fed262f0f3c5
(cherry picked from commit 87c996c15db0bd7b1ce075004605490fdeb1f979)
This commit is contained in:
tao wang authored and Lane.Wei committed 2023-09-22 16:21:26 +08:00
1 parent 061a2cdb7e
commit 50f9edec5c
5 files changed
+14 -9

No files matched your search

+6 -5
View File
@@ -2695,6 +2695,11 @@ void StatusPanel::update_basic_print_data(bool def)
void StatusPanel::update_model_info()
{
auto get_subtask_fn = [this](BBLModelTask* subtask) {
obj->set_modeltask(subtask);
};
if (wxGetApp().getAgent() && obj) {
BBLSubTask* curr_task = obj->get_subtask();
@@ -2703,11 +2708,7 @@ void StatusPanel::update_model_info()
if (!curr_model_task) {
curr_model_task = new BBLModelTask();
curr_model_task->task_id = curr_task->task_id;
int result = wxGetApp().getAgent()->get_subtask(curr_model_task);
if (result > -1) {
obj->set_modeltask(curr_model_task);
}
wxGetApp().getAgent()->get_subtask(curr_model_task, get_subtask_fn);
}
}
}