mirror of
https://github.com/ppy/osu
synced 2024-12-29 02:12:43 +00:00
Fix null reference in some tests due to missing realm context factory
This commit is contained in:
parent
441b7baa93
commit
9d85beddbe
@ -43,7 +43,11 @@ namespace osu.Game.Skinning
|
||||
|
||||
protected Skin(SkinInfo skin, IStorageResourceProvider resources, [CanBeNull] Stream configurationStream = null)
|
||||
{
|
||||
SkinInfo = skin.ToLive(resources.RealmContextFactory);
|
||||
SkinInfo = resources?.RealmContextFactory != null
|
||||
? skin.ToLive(resources.RealmContextFactory)
|
||||
// This path should only be used in some tests.
|
||||
: skin.ToLiveUnmanaged();
|
||||
|
||||
this.resources = resources;
|
||||
|
||||
configurationStream ??= getConfigurationStream();
|
||||
|
Loading…
Reference in New Issue
Block a user