misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions

This commit is contained in:
KeatonTheBot
2025-06-18 02:25:06 -05:00
parent a90db3464d
commit d2a532f971
90 changed files with 667 additions and 533 deletions
@@ -31,8 +31,12 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
}
}
writer.Write(bytes);
writer.Seek((int)maxSize - bytes.Length, SeekOrigin.Current);
if (bytes != null)
{
writer.Write(bytes);
writer.Seek((int)maxSize - bytes.Length, SeekOrigin.Current);
}
writer.Write((uint)text.Length); // String size
return (uint)text.Length; // Return the cursor position at the end of the text