mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 07:16:58 +08:00
#7396 - Fix of crash while slicing a particular stl file (missing checks into GCodeViewer::load_toolpaths())
This commit is contained in:
parent
9ea81a9dbf
commit
ba20cc4892
@ -1190,7 +1190,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
vertices.push_back(normal.z());
|
||||
};
|
||||
|
||||
if (prev.type != curr.type || !buffer.paths.back().matches(curr)) {
|
||||
if (buffer.paths.empty() || prev.type != curr.type || !buffer.paths.back().matches(curr)) {
|
||||
buffer.add_path(curr, vbuffer_id, vertices.size(), move_id - 1);
|
||||
buffer.paths.back().sub_paths.back().first.position = prev.position;
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
store_triangle(indices, v_offsets[4], v_offsets[5], v_offsets[6]);
|
||||
};
|
||||
|
||||
if (prev.type != curr.type || !buffer.paths.back().matches(curr)) {
|
||||
if (buffer.paths.empty() || prev.type != curr.type || !buffer.paths.back().matches(curr)) {
|
||||
buffer.add_path(curr, ibuffer_id, indices.size(), move_id - 1);
|
||||
buffer.paths.back().sub_paths.back().first.position = prev.position;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user