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:
Sergey Sharybin 2018-04-17 13:48:39 +02:00
parent b52cd283d9
commit c991bb0baf
1 changed files with 3 additions and 0 deletions

View File

@ -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.