diff --git a/LenovoLegionToolkit.Lib/Listeners/DisplayConfigurationListener.cs b/LenovoLegionToolkit.Lib/Listeners/DisplayConfigurationListener.cs index 2085408841..84cbd0e4fd 100644 --- a/LenovoLegionToolkit.Lib/Listeners/DisplayConfigurationListener.cs +++ b/LenovoLegionToolkit.Lib/Listeners/DisplayConfigurationListener.cs @@ -58,5 +58,17 @@ private void SystemEvents_DisplaySettingsChanged(object? sender, EventArgs e) Changed?.Invoke(this, new() { HDR = changed ? IsHDROn : null }); } - private static bool? GetHDRStatus() => Displays.Get().FirstOrDefault()?.GetAdvancedColorInfo().AdvancedColorEnabled; + private static bool? GetHDRStatus() + { + try + { + return Displays.Get().FirstOrDefault()?.GetAdvancedColorInfo().AdvancedColorEnabled; + } + catch (Exception ex) + { + if (Log.Instance.IsTraceEnabled) + Log.Instance.Trace($"Failed to get HDR status. Assuming unavailable.", ex); + return null; + } + } }