Fix (IRC-reported) wrong usercount handling of deprecated IPO datablocks.

versionning code would unref those twice... Reported by @ßergey on IRC, thanks!
This commit is contained in:
Bastien Montagne 2018-07-16 22:29:26 +02:00
parent e6af8758c8
commit b85be88655
Notes: blender-bot 2023-02-14 07:45:38 +01:00
Referenced by issue #62889, Bump Mapping has been broken since Aug 2018
Referenced by issue #56396, Cycles - Non-Deformation Motion Blur is inconsistant
Referenced by issue #56204, Edit Mode - Vertex Slide & Edge Slide do not honor 'C' toggle. problem affects multiple edit mode tools (shear as well)
Referenced by issue #56084, Material Preview icon in the material slots editor crashes out if you undo too fast
Referenced by issue #56035, Blender 2.79 - New Despgraph - Animation gets out of sync when dealing with visibility.
1 changed files with 2 additions and 3 deletions

View File

@ -1732,8 +1732,7 @@ void do_versions_ipos_to_animato(Main *bmain)
/* IPO first to take into any non-NLA'd Object Animation */
if (ob->ipo) {
ipo_to_animdata(bmain, id, ob->ipo, NULL, NULL, NULL);
id_us_min(&ob->ipo->id);
/* No need to id_us_min ipo ID here, ipo_to_animdata already does it. */
ob->ipo = NULL;
}
@ -1766,7 +1765,7 @@ void do_versions_ipos_to_animato(Main *bmain)
/* IPO second... */
if (ob->ipo) {
ipo_to_animdata(bmain, id, ob->ipo, NULL, NULL, NULL);
id_us_min(&ob->ipo->id);
/* No need to id_us_min ipo ID here, ipo_to_animdata already does it. */
ob->ipo = NULL;
{