From 954af8c1824949114fc15258743de7036e676ec1 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 29 Jan 2021 11:43:47 +0100 Subject: Geometry Nodes: missing null check for volume objects The problem was found by Dalai in T84606. --- source/blender/depsgraph/intern/depsgraph_query_iter.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source/blender/depsgraph') 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; + } } } -- cgit v1.2.3