From 636725235b8160fc3cb950b223671cd715e66667 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Sun, 15 Nov 2015 16:23:07 +0200 Subject: [PATCH] Add a null check to CachedTransform.Update() --- OpenRA.Game/Widgets/WidgetUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Widgets/WidgetUtils.cs b/OpenRA.Game/Widgets/WidgetUtils.cs index 95f467458e..fbb5055e52 100644 --- a/OpenRA.Game/Widgets/WidgetUtils.cs +++ b/OpenRA.Game/Widgets/WidgetUtils.cs @@ -273,7 +273,7 @@ namespace OpenRA.Widgets public U Update(T input) { - if (initialized && ((input == null && lastInput == null) || input.Equals(lastInput))) + if (initialized && ((input == null && lastInput == null) || (input != null && input.Equals(lastInput)))) return lastOutput; lastInput = input;