mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Convert assert to hard throw
This commit is contained in:
@ -988,8 +988,7 @@ namespace osu.Game
|
||||
if (cache)
|
||||
dependencies.CacheAs(component);
|
||||
|
||||
var drawableComponent = component as Drawable;
|
||||
Debug.Assert(drawableComponent != null);
|
||||
var drawableComponent = component as Drawable ?? throw new ArgumentException($"Component must be a {nameof(Drawable)}", nameof(component));
|
||||
|
||||
if (component is OsuFocusedOverlayContainer overlay)
|
||||
focusedOverlays.Add(overlay);
|
||||
|
Reference in New Issue
Block a user