Cycles: svn merge -r41225:41232 ^/trunk/blender
[blender.git] / source / blender / blenkernel / intern / speaker.c
index fb6a473..b743f84 100644 (file)
@@ -87,7 +87,9 @@ void make_local_speaker(Speaker *spk)
 
        if(spk->id.lib==NULL) return;
        if(spk->id.us==1) {
-               id_clear_lib_data(&bmain->speaker, (ID *)spk);
+               spk->id.lib= NULL;
+               spk->id.flag= LIB_LOCAL;
+               new_id(&bmain->speaker, (ID *)spk, NULL);
                return;
        }
 
@@ -101,7 +103,9 @@ void make_local_speaker(Speaker *spk)
        }
 
        if(local && lib==0) {
-               id_clear_lib_data(&bmain->speaker, (ID *)spk);
+               spk->id.lib= NULL;
+               spk->id.flag= LIB_LOCAL;
+               new_id(&bmain->speaker, (ID *)spk, NULL);
        }
        else if(local && lib) {
                Speaker *spkn= copy_speaker(spk);