FIX: add protection

Change-Id: I1587aa6e042f35fb1f17ae6f9041459f892fc942
This commit is contained in:
liz.li 2023-07-05 21:26:14 +08:00 committed by Lane.Wei
parent bcae2a7298
commit c344308b88
1 changed files with 9 additions and 5 deletions

View File

@ -770,9 +770,11 @@ void CalibrationPASavePage::update(MachineObject* obj)
}
bool CalibrationPASavePage::Show(bool show) {
if (curr_obj) {
show_panels(m_cali_method, curr_obj->printer_type);
sync_cali_result(curr_obj);
if (show) {
if (curr_obj) {
show_panels(m_cali_method, curr_obj->printer_type);
sync_cali_result(curr_obj);
}
}
return wxPanel::Show(show);
}
@ -1002,8 +1004,10 @@ bool CalibrationFlowX1SavePage::get_result(std::vector<std::pair<wxString, float
}
bool CalibrationFlowX1SavePage::Show(bool show) {
if (curr_obj) {
sync_cali_result(curr_obj->flow_ratio_results);
if (show) {
if (curr_obj) {
sync_cali_result(curr_obj->flow_ratio_results);
}
}
return wxPanel::Show(show);
}