[Bf-blender-cvs] [80255e67e30] master: Silence assert on ID usercount for deprecated IPO.

Bastien Montagne noreply at git.blender.org
Thu Apr 9 11:21:08 CEST 2020


Commit: 80255e67e30c4d77be64a5fa8dc68c0a55f39ebc
Author: Bastien Montagne
Date:   Thu Apr 9 11:19:11 2020 +0200
Branches: master
https://developer.blender.org/rB80255e67e30c4d77be64a5fa8dc68c0a55f39ebc

Silence assert on ID usercount for deprecated IPO.

We do not really care about those, so just avoid the noise when loading
very old files...

Re T75389.

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

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

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

diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index 286ee4a8723..487ec0bf161 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -320,7 +320,11 @@ void id_us_min(ID *id)
                  id->lib ? id->lib->filepath : "[Main]",
                  id->us,
                  limit);
-      BLI_assert(0);
+      if (GS(id->name) != ID_IP) {
+        /* Do not assert on deprecated ID types, we cannot really ensure that their ID refcounting
+         * is valid... */
+        BLI_assert(0);
+      }
       id->us = limit;
     }
     else {



More information about the Bf-blender-cvs mailing list