mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Add assertion on realm re-fetch being not-null
This commit is contained in:
parent
2b278ed324
commit
01487a1185
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
@ -46,6 +47,7 @@ namespace osu.Game.Database
|
|||||||
Realm.Realm.Write(realm =>
|
Realm.Realm.Write(realm =>
|
||||||
{
|
{
|
||||||
var managed = realm.Find<TModel>(item.ID);
|
var managed = realm.Find<TModel>(item.ID);
|
||||||
|
Debug.Assert(managed != null);
|
||||||
operation(managed);
|
operation(managed);
|
||||||
|
|
||||||
item.Files.Clear();
|
item.Files.Clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user