Fix uninitialized first_layer_time on CLI-sliced 3MF (#13429)

PartPlate::store_to_3mf_structure read first_layer_time from the indirect cali_bboxes_data struct,
which the GUI populates at Plater.cpp:10600 but the CLI never writes to. The result was uninitialized
memory leaking into slice_info.config

Read directly from get_slice_result()->initial_layer_time, which is populated by
GCodeProcessor::finalize() in both code paths and matches the pattern already used a few lines
above for gcode_prediction.

Also default-initialize PlateBBoxData::first_layer_time to 0.0f as a defense against any other consumer
reading it without an explicit write.
This commit is contained in:
Leo Lobato
2026-08-31 21:36:55 +02:00
committed by GitHub
parent fcf6f0a3a5
commit ca903faa56
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ struct PlateBBoxData
int first_extruder = 0;
float nozzle_diameter = 0.4;
std::string bed_type;
float first_layer_time;
float first_layer_time = 0.0f;
// version 1: use view type ColorPrint (filament color)
// version 2: use view type FilamentId (filament id)
int version = 2;