diff options
author | Jacques Lucke <jacques@blender.org> | 2021-01-29 13:43:47 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-01-29 13:44:30 +0300 |
commit | 954af8c1824949114fc15258743de7036e676ec1 (patch) | |
tree | 3c93901c14183475c85b49492d9cd0f5c9092339 /source/blender/depsgraph | |
parent | b62e98d4e2b3c0bd8f727e8786601d1974c5b0b9 (diff) |
Geometry Nodes: missing null check for volume objects
The problem was found by Dalai in T84606.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query_iter.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc index c9780b9b129..34465c12914 100644 --- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc +++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc @@ -207,13 +207,15 @@ bool deg_iterator_components_step(BLI_Iterator *iter) if (component != nullptr) { const Volume *volume = component->get_for_read(); - Object *temp_object = &data->temp_geometry_component_object; - *temp_object = *data->geometry_component_owner; - temp_object->type = OB_VOLUME; - temp_object->data = (void *)volume; - temp_object->runtime.select_id = data->geometry_component_owner->runtime.select_id; - iter->current = temp_object; - return true; + if (volume != nullptr) { + Object *temp_object = &data->temp_geometry_component_object; + *temp_object = *data->geometry_component_owner; + temp_object->type = OB_VOLUME; + temp_object->data = (void *)volume; + temp_object->runtime.select_id = data->geometry_component_owner->runtime.select_id; + iter->current = temp_object; + return true; + } } } |