diff options
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 834e7de5811..93e4b5fcfbe 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -39,6 +39,7 @@ #include <string.h> #include <stdlib.h> #include <stddef.h> +#include <assert.h> #include "MEM_guardedalloc.h" @@ -649,11 +650,9 @@ void *copy_libblock(void *rt) lb= which_libbase(G.main, GS(id->name)); idn= alloc_libblock(lb, GS(id->name), id->name+2); - - if(idn==NULL) { - printf("ERROR: Illegal ID name for %s (Crashing now)\n", id->name); - } - + + assert(idn != NULL); + idn_len= MEM_allocN_len(idn); if(idn_len - sizeof(ID) > 0) { cp= (char *)id; |