Fix #135664: Crash deleting pose asset from saved current file

Rather new code to build the asset library reference from a library
didn't cover the case where the current file library is saved to disk,
and as such implemented as on-disk library.
This commit is contained in:
Julian Eisel
2025-03-10 17:10:43 +01:00
parent 6eb5566104
commit 2b92b0d6d8

View File

@@ -20,6 +20,13 @@ OnDiskAssetLibrary::OnDiskAssetLibrary(eAssetLibraryType library_type,
std::optional<AssetLibraryReference> OnDiskAssetLibrary::library_reference() const
{
if (library_type() == ASSET_LIBRARY_LOCAL) {
AssetLibraryReference library_ref{};
library_ref.custom_library_index = -1;
library_ref.type = ASSET_LIBRARY_LOCAL;
return library_ref;
}
BLI_assert_msg(false,
"Library references are only available for built-in libraries and libraries "
"configured in the Preferences");