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

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;
{