From f57031a9db41859cd34e6b11c2a9a60f84b18f2a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 3 Apr 2020 00:59:27 +0200 Subject: [PATCH] turns out setting a null render target also just sets a null array --- MLEM/Extensions/GraphicsExtensions.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/MLEM/Extensions/GraphicsExtensions.cs b/MLEM/Extensions/GraphicsExtensions.cs index 50f5631..bcd4487 100644 --- a/MLEM/Extensions/GraphicsExtensions.cs +++ b/MLEM/Extensions/GraphicsExtensions.cs @@ -55,11 +55,7 @@ namespace MLEM.Extensions { } public void Dispose() { - if (this.lastTargets != null) { - this.device.SetRenderTargets(this.lastTargets); - } else { - this.device.SetRenderTarget(null); - } + this.device.SetRenderTargets(this.lastTargets); } }