From 19b185a52b2c091ef88d5cfb3f7f4a91e7acc9f8 Mon Sep 17 00:00:00 2001 From: prjanitor Date: Thu, 2 Apr 2026 07:50:25 +0300 Subject: [PATCH 1/2] Fix null reference exception in GraphicsSingleton.OnRender Add null checks for Overlay and Overlay.Animator before dereferencing in both foreach loops within the OnRender method. This prevents NullReferenceException when an overlay is added with a null Animator or if the Animator property is null due to initialization failure. --- OpenVROverlayPipe/GraphicsSingleton.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenVROverlayPipe/GraphicsSingleton.cs b/OpenVROverlayPipe/GraphicsSingleton.cs index 0ccea4e..82bc88b 100644 --- a/OpenVROverlayPipe/GraphicsSingleton.cs +++ b/OpenVROverlayPipe/GraphicsSingleton.cs @@ -63,6 +63,7 @@ internal void OnRender(TimeSpan delta) foreach (var overlay in Session.Overlays.Values) { + if (overlay == null || overlay.Animator == null) continue; _shader3d?.Use(); _shader3d?.SetInt("tex_index", overlay.Animator.GetFrame()); @@ -79,6 +80,7 @@ internal void OnRender(TimeSpan delta) foreach (var overlay in Session.Overlays.Values) { + if (overlay == null || overlay.Animator == null) continue; overlay.Animator.PostRender(); } } From 9b9704e5f1908083923dd057e0b7477cf8215956 Mon Sep 17 00:00:00 2001 From: prjanitor Date: Thu, 2 Apr 2026 10:10:19 +0300 Subject: [PATCH 2/2] Sign CLA with prjanitor GitHub username --- CLA.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLA.md b/CLA.md index d813558..397c2be 100644 --- a/CLA.md +++ b/CLA.md @@ -19,3 +19,5 @@ Add your GitHub username as a new entry at the end of the list. Do not alter oth - BOLL7708 - jeppevinkel +- prjanitor +