mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
Don't crash, if the number of lines to display is zero.
This commit is contained in:
parent
83166a7ff3
commit
42d9db04f2
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
#include "3DScene.hpp"
|
#include "3DScene.hpp"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
// caller is responsible for supplying NO lines with zero length
|
// caller is responsible for supplying NO lines with zero length
|
||||||
|
@ -15,6 +17,10 @@ _3DScene::_extrusionentity_to_verts_do(const Lines &lines, const std::vector<dou
|
||||||
// two triangles for each corner
|
// two triangles for each corner
|
||||||
tverts->reserve_more(3 * 3 * 2 * (lines.size() + 1));
|
tverts->reserve_more(3 * 3 * 2 * (lines.size() + 1));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
assert(! lines.empty());
|
||||||
|
if (lines.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
Line prev_line;
|
Line prev_line;
|
||||||
Pointf prev_b1, prev_b2;
|
Pointf prev_b1, prev_b2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue