From 8dda6d8e3da7199bc0ca0ebd1a76b1941f77ef86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 12 Jan 2020 20:46:12 +0100 Subject: [PATCH] Remove unnecessary null check. --- OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs b/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs index 33ad25c50b..6aeef7fed0 100644 --- a/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs +++ b/OpenRA.Mods.Common/Traits/World/PaletteFromGimpOrJascFile.cs @@ -60,9 +60,6 @@ namespace OpenRA.Mods.Common.Traits var colors = new uint[Palette.Size]; using (var lines = s.ReadAllLines().GetEnumerator()) { - if (lines == null) - throw new InvalidDataException("File {0} is empty.".F(Filename)); - if (!lines.MoveNext() || (lines.Current != "GIMP Palette" && lines.Current != "JASC-PAL")) throw new InvalidDataException("File `{0}` is not a valid GIMP or JASC palette.".F(Filename));