1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Add safety to ensure RealmLiveUnmanaged is not used with managed instances

This commit is contained in:
Dean Herbert 2022-01-17 17:28:01 +09:00
parent a2b6bc9e53
commit 8ef50ff42d

View File

@ -21,6 +21,9 @@ namespace osu.Game.Database
/// <param name="data">The realm data.</param>
public RealmLiveUnmanaged(T data)
{
if (data.IsManaged)
throw new InvalidOperationException($"Cannot use {nameof(RealmLiveUnmanaged<T>)} with managed instances");
Value = data;
}