[Bf-blender-cvs] [19e1ae866fc] ui-asset-view-template: Fix asset storage crash when closing Blender in release mode

Julian Eisel noreply at git.blender.org
Tue Mar 16 16:44:41 CET 2021


Commit: 19e1ae866fc90e808c275fdea4c3e4fdd0c14f71
Author: Julian Eisel
Date:   Tue Mar 16 16:41:04 2021 +0100
Branches: ui-asset-view-template
https://developer.blender.org/rB19e1ae866fc90e808c275fdea4c3e4fdd0c14f71

Fix asset storage crash when closing Blender in release mode

===================================================================

M	source/blender/editors/asset/asset_list.cc

===================================================================

diff --git a/source/blender/editors/asset/asset_list.cc b/source/blender/editors/asset/asset_list.cc
index 356c6dc1d33..2ff7aa48edd 100644
--- a/source/blender/editors/asset/asset_list.cc
+++ b/source/blender/editors/asset/asset_list.cc
@@ -113,13 +113,17 @@ class AssetList {
   {
   }
   AssetList(const AssetList &) = delete;
-  ~AssetList() = default;
+  ~AssetList()
+  {
+    /* Destructs the owned pointer. */
+    filelist_ = nullptr;
+  }
 
   void setup(const AssetFilterSettings *filter_settings = nullptr)
   {
     FileList *files = filelist_.get();
 
-    /* TODO there should only be one. */
+    /* TODO there should only be one (FileSelectAssetLibraryUID vs. AssetLibraryReference). */
     FileSelectAssetLibraryUID file_asset_lib_ref;
     file_asset_lib_ref.type = library_ref_.type;
     file_asset_lib_ref.custom_library_index = library_ref_.custom_library_index;



More information about the Bf-blender-cvs mailing list