Fix second crashing part of T44497, out of bounds access to hook

modifier data.

Unfortunately seems like we also lose the hook mapping by doing this,
but this can be fixed later and is probably a separate issue.
This commit is contained in:
2015-05-22 16:59:01 +02:00
parent cd9dc3143c
commit e529882be0

View File

@@ -1188,7 +1188,7 @@ static int *initialize_index_map(Object *obedit, int *r_old_totvert)
while (a--) {
keyIndex = getCVKeyIndex(editnurb, bezt);
if (keyIndex) {
if (keyIndex && keyIndex->vertex_index * 3 < old_totvert) {
if (keyIndex->switched) {
old_to_new_map[keyIndex->vertex_index] = vertex_index + 2;
old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;