diff --git a/RecrownedAthenaeum/UI/SkinSystem/Skin.cs b/RecrownedAthenaeum/UI/SkinSystem/Skin.cs index 10cb13b..af27331 100644 --- a/RecrownedAthenaeum/UI/SkinSystem/Skin.cs +++ b/RecrownedAthenaeum/UI/SkinSystem/Skin.cs @@ -47,9 +47,10 @@ namespace RecrownedAthenaeum.UI.SkinSystem /// Returns a with given name of region. /// /// Name of region. - /// The region corresponding to the name. + /// The region corresponding to the name or null if the requested region doesn't exist. public virtual TextureAtlas.Region GetTextureAtlasRegion(string name) { + if (!textureAtlas.ContainsRegion(name)) return null; return textureAtlas[name]; }