Add null checks to unguarded resolved-as-null fields

This commit is contained in:
Bartłomiej Dach
2020-11-14 14:48:48 +01:00
parent aae59dc3cf
commit 610ed99ae3
11 changed files with 24 additions and 13 deletions

View File

@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.UI
{
Debug.Assert(!drawableMap.ContainsKey(entry));
var drawable = pooledObjectProvider.GetPooledDrawableRepresentation(entry.HitObject);
var drawable = pooledObjectProvider?.GetPooledDrawableRepresentation(entry.HitObject);
if (drawable == null)
throw new InvalidOperationException($"A drawable representation could not be retrieved for hitobject type: {entry.HitObject.GetType().ReadableName()}.");