diff options
author | Julian Eisel <julian@blender.org> | 2021-03-11 15:02:47 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-03-11 15:06:31 +0300 |
commit | 018fffbe77414e2d6b80dc50d5f3d2d5bbf71169 (patch) | |
tree | 0794974cec50d303aed0542e49528052e00572d3 | |
parent | 42c5303409928f5cbc069baf2866ca6330119cce (diff) |
Fix failing assert when loading file with untraceable custom asset library
When loading a file with an asset browser open, and it showed a custom asset
library that can't be found currently (e.g. because the file is from somebody
else), the `BLI_assert(0)` in `rna_FileAssetSelectParams_asset_library_get()`
would fail.
There was code to handle this case already, but unlike I thought it didn't run
right after file read. Now it does.
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 83bb8abf5d8..039ab3d6907 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -193,6 +193,8 @@ static void file_init(wmWindowManager *UNUSED(wm), ScrArea *area) if (sfile->runtime == NULL) { sfile->runtime = MEM_callocN(sizeof(*sfile->runtime), __func__); } + /* Validate the params right after file read. */ + fileselect_refresh_params(sfile); } static void file_exit(wmWindowManager *wm, ScrArea *area) |