1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Add assertion on realm re-fetch being not-null

This commit is contained in:
Dean Herbert 2022-06-27 15:52:45 +09:00
parent 2b278ed324
commit 01487a1185

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using osu.Framework.Platform;
@ -46,6 +47,7 @@ namespace osu.Game.Database
Realm.Realm.Write(realm =>
{
var managed = realm.Find<TModel>(item.ID);
Debug.Assert(managed != null);
operation(managed);
item.Files.Clear();