Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2019-12-09 15:27:21 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-12-09 15:27:21 +0300
commite7e4cc5600b5264321c9a972be7d685da2b4a6d2 (patch)
treec69550739db0f22d667a9000f3de6bf0e54b0679 /src/admesh
parent61ab9e37d6cbafb62dc99f83520ff4fd9f930240 (diff)
Fixed crash while repairing imported model
Diffstat (limited to 'src/admesh')
-rw-r--r--src/admesh/connect.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/admesh/connect.cpp b/src/admesh/connect.cpp
index d6de6ce6a..c266c724c 100644
--- a/src/admesh/connect.cpp
+++ b/src/admesh/connect.cpp
@@ -601,11 +601,12 @@ void stl_remove_unconnected_facets(stl_file *stl)
stl->neighbors_start[facet].which_vertex_not[edge[1]],
stl->neighbors_start[facet].which_vertex_not[edge[2]]
};
+
// Update statistics on edge connectivity.
- if (neighbor[0] == -1)
- stl_update_connects_remove_1(neighbor[1]);
- if (neighbor[1] == -1)
- stl_update_connects_remove_1(neighbor[0]);
+ if ((neighbor[0] == -1) && (neighbor[1] != -1))
+ stl_update_connects_remove_1(neighbor[1]);
+ if ((neighbor[1] == -1) && (neighbor[0] != -1))
+ stl_update_connects_remove_1(neighbor[0]);
if (neighbor[0] >= 0) {
if (neighbor[1] >= 0) {