[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22708] branches/blender2.5/blender/source /blender/blenloader/intern/readfile.c: [#19229] 1 line fix resolves - segmentation Fault
Campbell Barton
ideasman42 at gmail.com
Sat Aug 22 19:11:36 CEST 2009
Revision: 22708
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22708
Author: campbellbarton
Date: 2009-08-22 19:11:36 +0200 (Sat, 22 Aug 2009)
Log Message:
-----------
[#19229] 1 line fix resolves - segmentation Fault
from Martin Frances (martinfrances)
Added a scene check when appending objects so you can append data without a scene.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2009-08-22 17:06:10 UTC (rev 22707)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2009-08-22 17:11:36 UTC (rev 22708)
@@ -3093,7 +3093,7 @@
psys->flag &= ~PSYS_KEYED;
}
- if(psys->particles->boid) {
+ if(psys->particles && psys->particles->boid) {
pa = psys->particles;
pa->boid = newdataadr(fd, pa->boid);
for(a=1,pa++; a<psys->totpart; a++, pa++)
@@ -10804,14 +10804,16 @@
fix_relpaths_library(G.sce, mainvar); /* make all relative paths, relative to the open blend file */
/* give a base to loose objects. If group append, do it for objects too */
- if(idcode==ID_GR) {
- if (flag & FILE_LINK) {
+ if(scene) {
+ if(idcode==ID_GR) {
+ if (flag & FILE_LINK) {
+ give_base_to_objects(mainvar, scene, NULL, 0);
+ } else {
+ give_base_to_objects(mainvar, scene, curlib, 1);
+ }
+ } else {
give_base_to_objects(mainvar, scene, NULL, 0);
- } else {
- give_base_to_objects(mainvar, scene, curlib, 1);
- }
- } else {
- give_base_to_objects(mainvar, scene, NULL, 0);
+ }
}
/* has been removed... erm, why? s..ton) */
/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
More information about the Bf-blender-cvs
mailing list