diff options
author | Jacques Lucke <jacques@blender.org> | 2022-11-07 16:15:22 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-11-08 14:42:14 +0300 |
commit | 14db6975e671bfe689be09aa32e1b555282a0faa (patch) | |
tree | f82663eeec89220d03e8487ab4acce7bf979e505 /source/blender | |
parent | 61eb425db8269a01aff47845735d0a8a9d991a60 (diff) |
Fix T102311: crash when opening node add menu with assets
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_node/add_menu_assets.cc | 7 |
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; }); } |