mirror of
https://github.com/osukey/osukey.git
synced 2025-06-01 10:57:27 +09:00
Add safety to ensure RealmLiveUnmanaged
is not used with managed instances
This commit is contained in:
parent
a2b6bc9e53
commit
8ef50ff42d
@ -21,6 +21,9 @@ namespace osu.Game.Database
|
|||||||
/// <param name="data">The realm data.</param>
|
/// <param name="data">The realm data.</param>
|
||||||
public RealmLiveUnmanaged(T data)
|
public RealmLiveUnmanaged(T data)
|
||||||
{
|
{
|
||||||
|
if (data.IsManaged)
|
||||||
|
throw new InvalidOperationException($"Cannot use {nameof(RealmLiveUnmanaged<T>)} with managed instances");
|
||||||
|
|
||||||
Value = data;
|
Value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user