Merge pull request #5840 from Mailaender/map-download-isometry-nre

Fixed a NullReferenceException in auto map download.
This commit is contained in:
Paul Chote
2014-07-07 22:31:25 +12:00

View File

@@ -132,7 +132,8 @@ namespace OpenRA.Widgets
public int2 ConvertToPreview(CPos cell)
{
var preview = Preview();
var point = Map.CellToMap(preview.Map.TileShape, cell);
var tileShape = Game.modData.Manifest.TileShape;
var point = Map.CellToMap(tileShape, cell);
var dx = (int)(previewScale * (point.X - preview.Bounds.Left));
var dy = (int)(previewScale * (point.Y - preview.Bounds.Top));
return new int2(mapRect.X + dx, mapRect.Y + dy);