diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-02-10 13:14:12 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-02-10 13:14:12 +0300 |
commit | 5dffb646756cf179cbc702f628e26db2384db0a0 (patch) | |
tree | dc0cd9a28ba9d3b8d777f7ccacce79d43cced314 /source/blender/editors | |
parent | fc3b29b637635092858c2671a0913ebe6a5343c0 (diff) |
Bugfix [#26002] Outliner Visible layers + Single object & data = broke
conections
It seems that some of the Outliner hacks used while building the tree
was causing problems, as Make Single User (and potentially other code
working with ID-data, specifically with the "newid" value there) was
making use of the variable used there for other purposes, leading to
memory corruption.
This bug also occurred in 2.4x, though when I tested there, it crashed
immediately.
Ton, you may want to double-check this bug!
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index b2edd786d50..0f8e5cec21b 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1377,6 +1377,11 @@ void single_object_users(Scene *scene, View3D *v3d, int flag) for(base= FIRSTBASE; base; base= base->next) { ob= base->object; + /* newid may still have some trash from Outliner tree building, + * so clear that first to avoid errors [#26002] + */ + ob->id.newid = NULL; + if( (base->flag & flag)==flag ) { if(ob->id.lib==NULL && ob->id.us>1) { /* base gets copy of object */ |