[Bf-blender-cvs] [e4e91bf8301] master: Fix crash when listing assets repeatedly in node search menus

Julian Eisel noreply at git.blender.org
Wed Jan 18 18:27:57 CET 2023


Commit: e4e91bf8301ace526c7bab8bfd2b06eeecf47e20
Author: Julian Eisel
Date:   Wed Jan 18 18:17:02 2023 +0100
Branches: master
https://developer.blender.org/rBe4e91bf8301ace526c7bab8bfd2b06eeecf47e20

Fix crash when listing assets repeatedly in node search menus

When doing partial reloads of asset libraries (only reload assets from
the current file, e.g. after undo re-allocated ID pointers), we'd end up
with assets that don't have their asset data read correctly. It would
execute a branch that didn't set the asset library object necessary to
create and store asset representations.

Steps to reproduce were:
* Open .blend file with geometry node assets in there
* In a geometry node editor, press Shift+A to open the add menu
* Cancel
* Move a node
* Undo
* Press Shift+A again

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

M	source/blender/editors/space_file/filelist.cc

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

diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc
index 22986672650..7a982914878 100644
--- a/source/blender/editors/space_file/filelist.cc
+++ b/source/blender/editors/space_file/filelist.cc
@@ -3724,7 +3724,8 @@ static void filelist_readjob_load_asset_library_data(FileListReadJob *job_params
     return;
   }
   if (tmp_filelist->asset_library != nullptr) {
-    /* Asset library already loaded. */
+    /* Asset library itself is already loaded. Load assets into this. */
+    job_params->load_asset_library = tmp_filelist->asset_library;
     return;
   }



More information about the Bf-blender-cvs mailing list