Fixed a crash when slicing leads to no print.

Fixed a bug in TriangleMesh::bounding_box().
This commit is contained in:
bubnikv 2017-09-12 16:48:44 +02:00
parent b08d6f1969
commit 98408bbed0
4 changed files with 6 additions and 2 deletions

View file

@ -1253,7 +1253,8 @@ void PrintObject::_slice()
goto end;
delete layer;
this->layers.pop_back();
this->layers.back()->upper_layer = nullptr;
if (! this->layers.empty())
this->layers.back()->upper_layer = nullptr;
}
end:
;