svn merge ^/trunk/blender -r42261:42290
[blender.git] / source / blender / blenkernel / intern / library.c
index 4155551763ece5cff3342062cb1242623424b390..28524668bd3af0c8a8f36bf8aeea1a1c0480c424 100644 (file)
  * from id_make_local() but then the make local functions would not be self
  * contained.
  * also note that the id _must_ have a library - campbell */
-void BKE_id_lib_local_paths(Main *bmain, ID *id)
+void BKE_id_lib_local_paths(Main *bmain, Library *lib, ID *id)
 {
-       char *bpath_user_data[2]= {bmain->name, (id)->lib->filepath};
+       char *bpath_user_data[2]= {bmain->name, lib->filepath};
 
        bpath_traverse_id(bmain, id,
                                          bpath_relocate_visitor,
@@ -1278,7 +1278,7 @@ int new_id(ListBase *lb, ID *id, const char *tname)
    don't have other library users. */
 void id_clear_lib_data(Main *bmain, ID *id)
 {
-       BKE_id_lib_local_paths(bmain, id);
+       BKE_id_lib_local_paths(bmain, id->lib, id);
 
        id->lib= NULL;
        id->flag= LIB_LOCAL;