From efa77a241555efa3ddfa3425919211ce6c8134a7 Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Wed, 21 Oct 2020 09:06:13 -0300
Subject: [PATCH] Add missing null check on image binding (#1632)

---
 Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
index e7800314e..13a275b85 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
@@ -304,7 +304,7 @@ namespace Ryujinx.Graphics.Gpu.Image
 
                     Format format = binding.Format;
 
-                    if (format == 0)
+                    if (format == 0 && texture != null)
                     {
                         format = texture.Format;
                     }