This commit is contained in:
Chris Forbes
2010-01-27 20:50:16 +13:00
parent 5916cb473c
commit 059290e8de

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using IjwFramework.Collections;
using OpenRa.FileFormats;
@@ -16,7 +17,7 @@ namespace OpenRa.Graphics
var shp = new Dune2ShpReader(FileSystem.OpenWithExts(filename, exts));
return shp.Select(a => SheetBuilder.Add(a.Image, a.Size)).ToArray();
}
catch (System.IndexOutOfRangeException) // This will occur when loading a custom (RA-format) .shp
catch (IndexOutOfRangeException) // This will occur when loading a custom (RA-format) .shp
{
var shp = new ShpReader(FileSystem.OpenWithExts(filename, exts));
return shp.Select(a => SheetBuilder.Add(a.Image, shp.Size)).ToArray();