diff --git a/src/Ryujinx.Graphics.Gpu/Image/TexturePool.cs b/src/Ryujinx.Graphics.Gpu/Image/TexturePool.cs index a87b14815c..2da946ef38 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/TexturePool.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/TexturePool.cs @@ -278,6 +278,12 @@ namespace Ryujinx.Graphics.Gpu.Image /// The texture descriptor with the given ID public ref readonly TextureDescriptor GetForBinding(int id, Format format, out Texture texture) { + if ((uint)id >= Items.Length) + { + texture = null; + return ref _defaultDescriptor; + } + ref readonly TextureDescriptor descriptor = ref GetInternal(id, out texture); if (texture != null && format != 0 && texture.Format != format)