From e4e91bf8301ace526c7bab8bfd2b06eeecf47e20 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 18 Jan 2023 18:17:02 +0100 Subject: [PATCH] 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 --- source/blender/editors/space_file/filelist.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }