From 3ff71d5982a3687f16418ca0e3c263910f1fc67c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 5 Oct 2013 13:29:39 +1300 Subject: [PATCH] Fix asset downloader NRE. Fixes #3898. --- OpenRA.Game/Game.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index f4921e1498..a962476d3e 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -138,7 +138,9 @@ namespace OpenRA { ++RenderFrame; viewport.DrawRegions(worldRenderer, new DefaultInputHandler(orderManager.world)); - Sound.SetListenerPosition(worldRenderer.Position(viewport.CenterLocation.ToInt2())); + + if (worldRenderer != null) + Sound.SetListenerPosition(worldRenderer.Position(viewport.CenterLocation.ToInt2())); } PerfHistory.items["render"].Tick();