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:
authorTon Roosendaal <ton@blender.org>2008-12-14 13:08:00 +0300
committerTon Roosendaal <ton@blender.org>2008-12-14 13:08:00 +0300
commit7e6c5b912de50e2fa4607aabcd8dac0b8999fccc (patch)
tree1a9635937edf487247273642b915378b3547b8f5 /source/blender/blenloader
parent93f3eaafea1a3099b9e067ad6803aa57139f9ee1 (diff)
2.5
Added freeing functions in outliner space, this makes blender quit without memory free errors in my test .b.blends. Note: I'll move current rna viewer to new SpaceData editor, then I can bring back original outliner stuff. Proposed menu name is "Data Viewer". Probably better not not expose name 'rna' in UI?
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 93cacaf61a1..d62c4e62535 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4510,8 +4510,17 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID
allocname= dataname(GS(id->name));
/* read all data */
+
while(bhead && bhead->code==DATA) {
- void *data= read_struct(fd, bhead, allocname);
+ void *data;
+ /* XXX BAD DEBUGGING OPTION TO GIVE NAMES */
+ short *sp= fd->filesdna->structs[bhead->SDNAnr];
+ char *allocname = fd->filesdna->types[ sp[0] ];
+ char *tmp= malloc(100);
+
+ strcpy(tmp, allocname);
+
+ data= read_struct(fd, bhead, tmp);
if (data) {
oldnewmap_insert(fd->datamap, bhead->old, data, 0);