misc: chore: Fix possible NullReferenceExceptions, suppress warnings

This commit is contained in:
KeatonTheBot
2025-12-13 13:32:49 -06:00
parent 9920619ff6
commit c70f692324
29 changed files with 100 additions and 80 deletions
@@ -225,10 +225,15 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender
{
Hash128 hash = XXHash128.ComputeHash(MemoryMarshal.Cast<uint, byte>(entry.Code));
string[] constants = new string[entry.Constants != null ? entry.Constants.Length : 0];
string[] constants = new string[entry.Constants?.Length ?? 0];
for (int i = 0; i < constants.Length; i++)
{
if (entry.Constants == null)
{
continue;
}
RgbFloat rgb = entry.Constants[i];
constants[i] = string.Format(CultureInfo.InvariantCulture, "new " + nameof(RgbFloat) + "({0}f, {1}f, {2}f)", rgb.R, rgb.G, rgb.B);