Commit: f2726297a904eacd71ce4101aa2f49fa16673a0b
Author: Kévin Dietrich
Date:   Tue Jul 12 13:05:36 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rBf2726297a904eacd71ce4101aa2f49fa16673a0b

Use ID_IS_LINKED_DATABLOCK macro.

Also avoid using G.main if bmain is already passed to the function.

===================================================================

M       source/blender/blenkernel/intern/cachefile.c

===================================================================

diff --git a/source/blender/blenkernel/intern/cachefile.c 
b/source/blender/blenkernel/intern/cachefile.c
index 3a48809..c296aa0 100644
--- a/source/blender/blenkernel/intern/cachefile.c
+++ b/source/blender/blenkernel/intern/cachefile.c
@@ -98,8 +98,8 @@ CacheFile *BKE_cachefile_copy(Main *bmain, CacheFile 
*cache_file)
                BKE_cachefile_load(new_cache_file, bmain->name);
        }
 
-       if (cache_file->id.lib) {
-               BKE_id_lib_local_paths(G.main, cache_file->id.lib, 
&new_cache_file->id);
+       if (ID_IS_LINKED_DATABLOCK(cache_file)) {
+               BKE_id_lib_local_paths(bmain, cache_file->id.lib, 
&new_cache_file->id);
        }
 
        return new_cache_file;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to