Fix crash with pinned geometry node tree with no active object

The check for a null active object was after trying to retrieve the active
modifier from the object.
This commit is contained in:
2021-03-05 10:13:42 -06:00
parent d5c727c6ea
commit f882bee431

View File

@@ -62,8 +62,12 @@ const NodeUIStorage *BKE_node_tree_ui_storage_get_from_context(const bContext *C
}
const Object *active_object = CTX_data_active_object(C);
if (active_object == nullptr) {
return nullptr;
}
const ModifierData *active_modifier = BKE_object_active_modifier(active_object);
if (active_object == nullptr || active_modifier == nullptr) {
if (active_modifier == nullptr) {
return nullptr;
}