bugfix [#24015] Deleting Objects with a Point Density Texture and Rendering Crashes Blender

This commit is contained in:
Campbell Barton
2010-09-27 05:02:54 +00:00
parent 5158684256
commit 767a05da44

View File

@@ -532,12 +532,10 @@ void unlink_object(Scene *scene, Object *ob)
}
/* textures */
tex= bmain->tex.first;
while(tex) {
if(tex->env) {
if(tex->env->object == ob) tex->env->object= NULL;
}
tex= tex->id.next;
for(tex= bmain->tex.first; tex; tex= tex->id.next) {
if(tex->env && (ob==tex->env->object)) tex->env->object= NULL;
if(tex->pd && (ob==tex->pd->object)) tex->pd->object= NULL;
if(tex->vd && (ob==tex->vd->object)) tex->vd->object= NULL;
}
/* worlds */