Fix T59404: Mistake in recent EdgeHash refactor broke edge generations in mesh valida...
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 17 Dec 2018 13:28:29 +0000 (14:28 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 17 Dec 2018 13:28:29 +0000 (14:28 +0100)
source/blender/blenlib/intern/edgehash.c

index b46383cf9de689237ef4747bbb3a01c6fbdc7ff8..8b83fc7a3135838381680a0a0ac3e7d653002c39 100644 (file)
@@ -357,7 +357,7 @@ bool BLI_edgehash_ensure_p(EdgeHash *eh, uint v0, uint v1, void ***r_value)
                }
                else if (index == SLOT_EMPTY) {
                        if (edgehash_ensure_can_insert(eh)) {
-                               edgehash_insert(eh, edge, NULL);
+                               *r_value = &edgehash_insert(eh, edge, NULL)->value;
                        }
                        else {
                                *r_value = &edgehash_insert_at_slot(eh, slot, edge, NULL)->value;