From 1634cd1a3cb1e1a2a8ee44002873ce8c462d14cf Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 6 May 2019 16:57:46 +0200 Subject: [PATCH] Fix asan crash on statistics step --- src/libslic3r/SLAPrint.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libslic3r/SLAPrint.hpp b/src/libslic3r/SLAPrint.hpp index f43c3bf7a..64b2160b0 100644 --- a/src/libslic3r/SLAPrint.hpp +++ b/src/libslic3r/SLAPrint.hpp @@ -176,6 +176,8 @@ private: { return level(r1) < level(r2); }); + + if(it == cont.end()) return it; T diff = std::abs(level(*it) - lvl);