mirror of
https://github.com/jamenai/opensim-addon-modules-exp.git
synced 2026-07-27 21:10:25 +00:00
hups :)
This commit is contained in:
+6
-2
@@ -547,9 +547,13 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
{
|
||||
weakAssetReferences.AddOrUpdate(
|
||||
key,
|
||||
static _ => new WeakReference<AssetBase>(asset),
|
||||
static (_, existing) =>
|
||||
_ => new WeakReference<AssetBase>(asset),
|
||||
(_, existing) =>
|
||||
{
|
||||
// defensive: handle rare case where existing could be null
|
||||
if (existing is null)
|
||||
return new WeakReference<AssetBase>(asset);
|
||||
|
||||
existing.SetTarget(asset);
|
||||
return existing;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user