Replace a problematic Get with GetOrNull in MapEditorLogic.

This commit is contained in:
Taryn Hill
2015-06-12 23:00:43 -05:00
parent b98d98c6d6
commit 6c3e127469

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
gridButton.IsHighlighted = () => terrainGeometryTrait.Enabled;
}
var zoomDropdown = widget.Get<DropDownButtonWidget>("ZOOM_BUTTON");
var zoomDropdown = widget.GetOrNull<DropDownButtonWidget>("ZOOM_BUTTON");
if (zoomDropdown != null)
{
var selectedZoom = Game.Settings.Graphics.PixelDouble ? 2f : 1f;