From 610d9348f588734023c5ba34b2621b2d4fcddca8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 4 Aug 2009 09:20:48 +0000 Subject: - allow changing game engine physics types in RNA - allow appending with a NULL scene (only used to add object bases into the current scene) --- source/blender/blenloader/intern/readfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 28694233331..f52afd9391d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10543,7 +10543,7 @@ static void append_named_part(FileData *fd, Main *mainvar, Scene *scene, char *n } } - if(idcode==ID_OB) { /* loose object: give a base */ + if(idcode==ID_OB && scene) { /* loose object: give a base */ base= MEM_callocN( sizeof(Base), "app_nam_part"); BLI_addtail(&scene->base, base); @@ -10683,7 +10683,8 @@ void BLO_script_library_append(BlendHandle **bh, char *dir, char *name, if(fd) fd->reports= NULL; /* do we need to do this? */ - DAG_scene_sort(scene); + if(scene) + DAG_scene_sort(scene); *bh= (BlendHandle*)fd; } -- cgit v1.2.3