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.
This commit is contained in:
parent
42c5303409
commit
018fffbe77
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue