mirror of
https://github.com/ppy/osu.git
synced 2026-05-19 04:32:11 +08:00
Add safety to ensure RealmLiveUnmanaged is not used with managed instances
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user