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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user