From 1f19a40724e6ff30cad672f39bdf2f743c361906 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 31 Jul 2018 23:17:57 +0100 Subject: [PATCH] Fix for corsair when "Show only connected devices" is enabled in cue --- .../Project-Aurora/Devices/Corsair/CorsairDevice.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Devices/Corsair/CorsairDevice.cs b/Project-Aurora/Project-Aurora/Devices/Corsair/CorsairDevice.cs index dbfde2654..f64d5519f 100755 --- a/Project-Aurora/Project-Aurora/Devices/Corsair/CorsairDevice.cs +++ b/Project-Aurora/Project-Aurora/Devices/Corsair/CorsairDevice.cs @@ -78,10 +78,14 @@ public bool Initialize() mouse = CueSDK.MouseSDK; headset = CueSDK.HeadsetSDK; mousemat = CueSDK.MousematSDK; - keyboard.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; - mouse.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; - headset.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; - mousemat.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; + if (keyboard != null) + keyboard.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; + if (mouse != null) + mouse.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; + if (headset != null) + headset.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; + if (mousemat != null) + mousemat.Brush = (CUE.NET.Brushes.SolidColorBrush)Color.Transparent; if (keyboard == null && mouse == null && headset == null && mousemat == null)