yet another fix-for-fix, missing NULL check in id_us_ensure_real()

This commit is contained in:
Campbell Barton 2012-12-19 01:28:00 +00:00
parent f6c5a72e3f
commit efc75018d7

@ -155,8 +155,10 @@ void id_lib_extern(ID *id)
/* ensure we have a real user */
void id_us_ensure_real(ID *id)
{
if (ID_REAL_USERS(id) <= 0) {
id->us = MAX2(id->us, 0) + 1;
if (id) {
if (ID_REAL_USERS(id) <= 0) {
id->us = MAX2(id->us, 0) + 1;
}
}
}