FIX:add protection when slice information is not available

Change-Id: Iaf654c8a14252f6647a64ded97d4ded3e79d7057
This commit is contained in:
tao wang 2022-08-31 11:15:46 +08:00 committed by Lane.Wei
parent bb1be58815
commit 1c7b183035
1 changed files with 1 additions and 0 deletions

View File

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