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:
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r--source/blender/blenkernel/intern/key.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 354b3b0e7d8..f4b931ec52b 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1850,9 +1850,12 @@ void vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3])
tot= count_curveverts(&cu->nurb);
}
- fp= kb->data= MEM_callocN(tot*elemsize, "key_to_vertcos vertCos");
+ if (tot == 0) {
+ kb->data= NULL;
+ return;
+ }
- if (tot == 0) return;
+ fp= kb->data= MEM_callocN(tot*elemsize, "key_to_vertcos vertCos");
/* Copy coords to keyblock */