svn merge ^/trunk/blender -r42261:42290
[blender.git] / source / blender / blenkernel / intern / mesh.c
index 5b12425ef104cc7d1990011882b9ff5aaa8cbac8..b683d74d5f7f1a80fe8ef7b44e59e9855e7fb2a3 100644 (file)
@@ -655,15 +655,15 @@ void make_local_mesh(Mesh *me)
                expand_local_mesh(me);
        }
        else if(local && lib) {
-               Mesh *men= copy_mesh(me);
-               men->id.us= 0;
+               Mesh *me_new= copy_mesh(me);
+               me_new->id.us= 0;
 
-               BKE_id_lib_local_paths(bmain, &men->id);
+               BKE_id_lib_local_paths(bmain, me->id.lib, &me_new->id);
 
                for(ob= bmain->object.first; ob; ob= ob->id.next) {
                        if(me == ob->data) {
                                if(ob->id.lib==NULL) {
-                                       set_mesh(ob, men);
+                                       set_mesh(ob, me_new);
                                }
                        }
                }