From 5a1a41096b546052fc0295073d1360ed73edbd6a Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Mon, 11 Jan 2021 12:20:50 +0100 Subject: [PATCH] Fix of a crash when slicing an object producing no layers and elphant foot compensation is enabled. --- src/libslic3r/PrintObject.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 683827501..99b4130f4 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -2004,10 +2004,9 @@ end: layer->make_slices(); } }); - if (elephant_foot_compensation_scaled > 0.f) { + if (elephant_foot_compensation_scaled > 0.f && ! m_layers.empty()) { // The Elephant foot has been compensated, therefore the 1st layer's lslices are shrank with the Elephant foot compensation value. // Store the uncompensated value there. - assert(! m_layers.empty()); assert(m_layers.front()->id() == 0); m_layers.front()->lslices = std::move(lslices_1st_layer); }