Depsgraph: Allow querying NULL IDs for evaluated version
Saves us from extra checks for NULL pointers when using datablocks for read.
This commit is contained in:
parent
b52cd283d9
commit
c991bb0baf
|
@ -151,6 +151,9 @@ Object *DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
|
|||
|
||||
ID *DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id)
|
||||
{
|
||||
if (id == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
/* TODO(sergey): This is a duplicate of Depsgraph::get_cow_id(),
|
||||
* but here we never do assert, since we don't know nature of the
|
||||
* incoming ID datablock.
|
||||
|
|
Loading…
Reference in New Issue