Fix of a crash with sequential print and raft. Fixes #9464

This commit is contained in:
Vojtech Bubnik 2023-02-03 15:50:15 +01:00
parent 5b94971fce
commit 43dc3bfc42

View File

@ -1784,9 +1784,7 @@ std::vector<GCode::InstanceToPrint> GCode::sort_print_object_instances(
if (ordering == nullptr) { if (ordering == nullptr) {
// Sequential print, single object is being printed. // Sequential print, single object is being printed.
assert(object_layers.size() == 1); assert(object_layers.size() == 1);
const Layer *layer = object_layers.front().object_layer; out.emplace_back(0, *object_layers.front().object(), single_object_instance_idx);
assert(layer != nullptr);
out.emplace_back(0, *layer->object(), single_object_instance_idx);
} else { } else {
// Create mapping from PrintObject* to ObjectLayerToPrint ID. // Create mapping from PrintObject* to ObjectLayerToPrint ID.
std::vector<std::pair<const PrintObject*, size_t>> sorted; std::vector<std::pair<const PrintObject*, size_t>> sorted;