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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-13 14:44:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-13 14:46:17 +0300
commit54fa78a048084bc3bebb7ca23594d00493cf0550 (patch)
tree09491404546153db90bc225fd4c0e0ed0683bb6f /source/blender/blenlib
parenta4afbe11532751a4a4c819b133026222c768d429 (diff)
BLI_edgehash: assert when edges use the same vert
This was removed on the recent upgrade.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/edgehash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index 996c815a062..7061c1b8702 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -94,6 +94,9 @@ BLI_INLINE uint32_t calc_edge_hash(Edge edge)
BLI_INLINE Edge init_edge(uint v0, uint v1)
{
+ /* If there are use cases where we need this it could be removed (or flag to allow),
+ * for now this helps avoid incorrect usage (creating degenerate geometry). */
+ BLI_assert(v0 != v1);
Edge edge;
if (v0 < v1) {
edge.v_low = v0;