WorldRenderer: use string.IsNullOrEmpty for check in Palette method

Unified usage of WorldRenderer.Palette method when it comes to appending player name (in case of player palette)
This commit is contained in:
michaeldgg2
2023-06-02 12:07:14 +02:00
committed by Gustas
parent b944b21325
commit 1a2d43fc99
4 changed files with 5 additions and 10 deletions

View File

@@ -87,7 +87,7 @@ namespace OpenRA.Graphics
{
// HACK: This is working around the fact that palettes are defined on traits rather than sequences
// and can be removed once this has been fixed.
return name == null ? null : palettes.GetOrAdd(name, createPaletteReference);
return string.IsNullOrEmpty(name) ? null : palettes.GetOrAdd(name, createPaletteReference);
}
public void AddPalette(string name, ImmutablePalette pal, bool allowModifiers = false, bool allowOverwrite = false)