Commit: b4ba8db62c829c32b0de539f40549beacb7cc746
Author: Julian Eisel
Date: Fri Sep 10 12:28:49 2021 +0200
Branches: temp-asset-browser-catalogs-ui
https://developer.blender.org/rBb4ba8db62c829c32b0de539f40549beacb7cc746
Fix failure in asset catalog tests
===================================================================
M source/blender/blenkernel/intern/asset_catalog.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/asset_catalog.cc
b/source/blender/blenkernel/intern/asset_catalog.cc
index bcc2d5f75d9..9142e4fc3bd 100644
--- a/source/blender/blenkernel/intern/asset_catalog.cc
+++ b/source/blender/blenkernel/intern/asset_catalog.cc
@@ -71,7 +71,11 @@ AssetCatalog *AssetCatalogService::create_catalog(const
CatalogPath &catalog_pat
catalog_definition_file_->add_new(catalog_ptr);
catalog_definition_file_->write_to_disk();
- catalog_tree_->insert_item(catalog_ptr->path);
+ /* Null when the service only writes, but didn't load anything
+ * (#AssetCatalogService::load_from_disk() not called). */
+ if (catalog_tree_) {
+ catalog_tree_->insert_item(catalog_ptr->path);
+ }
return catalog_ptr;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs