FIX:add code protection when updating print basic info

Change-Id: If64c24e394276c3c127bb12039353ae478481192
This commit is contained in:
tao wang 2022-08-30 17:46:19 +08:00 committed by Lane.Wei
parent e11c354999
commit b510e94e06
1 changed files with 1 additions and 0 deletions

View File

@ -1725,6 +1725,7 @@ void StatusPanel::update_left_time(int mc_left_time)
void StatusPanel::update_basic_print_data(bool def)
{
if (def) {
if (!obj) return;
wxString prediction = wxString::Format("%s", get_bbl_time_dhms(obj->slice_info->prediction));
wxString weight = wxString::Format("%.2fg", obj->slice_info->weight);