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:
parent
a2b6bc9e53
commit
8ef50ff42d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user