diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-12 15:48:55 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-12 15:48:55 +0400 |
commit | 2c9e8e75939553f03b01f34c185f5875473bad40 (patch) | |
tree | 3d21be4b5fc0c03c3a51dac34ecde3b5edb3fe8b /source/blender/blenlib | |
parent | 97dd2fe33e07ae96a48022165a5f2205163f59a3 (diff) |
Fix for bug #11140: explode modifier could run out of memory quite
quickly because it allocated a totvert*totvert size array, now uses
edgehash instead.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_edgehash.h | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/edgehash.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h index f3aa69d77ff..abbd17c3635 100644 --- a/source/blender/blenlib/BLI_edgehash.h +++ b/source/blender/blenlib/BLI_edgehash.h @@ -86,6 +86,9 @@ void BLI_edgehashIterator_getKey (EdgeHashIterator *ehi, int *v0_r, int *v1 /* Retrieve the value from an iterator. */ void* BLI_edgehashIterator_getValue (EdgeHashIterator *ehi); + /* Set the value for an iterator. */ +void BLI_edgehashIterator_setValue (EdgeHashIterator *ehi, void *val); + /* Steps the iterator to the next index. */ void BLI_edgehashIterator_step (EdgeHashIterator *ehi); diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index 6aa0ded63b9..3e1c8afb7a8 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -200,6 +200,11 @@ void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi) { return ehi->curEntry?ehi->curEntry->val:NULL; } +void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val) { + if(ehi->curEntry) + ehi->curEntry->val= val; +} + void BLI_edgehashIterator_step(EdgeHashIterator *ehi) { if (ehi->curEntry) { ehi->curEntry= ehi->curEntry->next; |