Fix a tooltip crash.

This commit is contained in:
Paul Chote
2011-07-06 06:08:33 +12:00
parent b2bfc5368a
commit 3d9a8cc002

View File

@@ -41,6 +41,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
tooltipContainer.BeforeRender = () =>
{
if (wic == null || wic.ActorTooltip == null) return;
labelText = wic.TooltipType == Type.Unexplored ? "Unexplored Terrain" :
wic.ActorTooltip.Name();
var textWidth = font.Measure(labelText).X;