Fixed method ExportLines::update() to avoid potential deferencing of invalid iterator

This commit is contained in:
enricoturri1966 2023-04-13 15:34:09 +02:00
parent c1e145b86c
commit c8468839da

View File

@ -3566,7 +3566,7 @@ void GCodeProcessor::post_process()
++m_curr_g1_id; ++m_curr_g1_id;
} }
if (it != init_it || m_curr_g1_id == 0) if ((it != m_machine.g1_times_cache.end() && it != init_it) || m_curr_g1_id == 0)
m_time = it->elapsed_time; m_time = it->elapsed_time;
} }