Fix mistake in new ID copy code in 'no allocate' case.

Spotted by @sergey, thanks.
This commit is contained in:
Bastien Montagne 2017-10-18 17:11:29 +02:00
parent 264837cb46
commit a2b541bd22
1 changed files with 1 additions and 1 deletions

View File

@ -529,7 +529,7 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, con
ID_IP /* Deprecated */
BLI_assert(test || (r_newid != NULL));
if (r_newid != NULL) {
if (r_newid != NULL && (flag & LIB_ID_CREATE_NO_ALLOCATE) == 0) {
*r_newid = NULL;
}
if (id == NULL) {