Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-11-07 16:15:22 +0300
committerJacques Lucke <jacques@blender.org>2022-11-07 16:15:33 +0300
commit79d8610d040612b902404750d0ae1be45205eeca (patch)
treea2040745cfe29240b4d60d68a5cd8adf34e7b991
parent8f4e52b7e0dd70d5ec52cbe31fd29418e8e2fa03 (diff)
Fix T102311: crash when opening node add menu with assets
-rw-r--r--source/blender/editors/space_node/add_menu_assets.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/add_menu_assets.cc b/source/blender/editors/space_node/add_menu_assets.cc
index 1ba1d67d854..5458a25d74a 100644
--- a/source/blender/editors/space_node/add_menu_assets.cc
+++ b/source/blender/editors/space_node/add_menu_assets.cc
@@ -114,8 +114,11 @@ static AssetItemTree build_catalog_tree(const bContext &C, const bNodeTree *node
if (BLI_uuid_is_nil(meta_data.catalog_id)) {
return true;
}
- const LibraryCatalog &library_catalog = id_to_catalog_map.lookup(meta_data.catalog_id);
- assets_per_path.add(library_catalog.catalog->path, LibraryAsset{library_ref, asset});
+ const LibraryCatalog *library_catalog = id_to_catalog_map.lookup_ptr(meta_data.catalog_id);
+ if (library_catalog == nullptr) {
+ return true;
+ }
+ assets_per_path.add(library_catalog->catalog->path, LibraryAsset{library_ref, asset});
return true;
});
}