diff options
Diffstat (limited to 'source/blender/collada/DocumentImporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 674a79f0fe7..498e65790f3 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -388,7 +388,7 @@ Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera Camera *cam = uid_camera_map[cam_uid]; Camera *old_cam = (Camera *)ob->data; ob->data = cam; - old_cam->id.us--; + id_us_min(&old_cam->id); if (old_cam->id.us == 0) BKE_libblock_free(G.main, old_cam); return ob; @@ -406,7 +406,7 @@ Object *DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Sce Lamp *la = uid_lamp_map[lamp_uid]; Lamp *old_lamp = (Lamp *)ob->data; ob->data = la; - old_lamp->id.us--; + id_us_min(&old_lamp->id); if (old_lamp->id.us == 0) BKE_libblock_free(G.main, old_lamp); return ob; |