From ede484bfb83bfc4b38b6629dc6d72b6186b10231 Mon Sep 17 00:00:00 2001 From: Jokke <11576776+JokkeeZ@users.noreply.github.com> Date: Tue, 4 May 2021 12:56:47 +0300 Subject: [PATCH] Fix NullReferenceException, if NZXT CAM is running at the same time (#434) * Fix NullReferenceException, if NZXT CAM is running at the same time * Remove unnecessary variable declaration Remove never used variable. * Update SMBios.cs Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com> --- LibreHardwareMonitorLib/Hardware/Controller/Nzxt/KrakenX3.cs | 2 +- LibreHardwareMonitorLib/Hardware/SMBios.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LibreHardwareMonitorLib/Hardware/Controller/Nzxt/KrakenX3.cs b/LibreHardwareMonitorLib/Hardware/Controller/Nzxt/KrakenX3.cs index 4644184..bc5de6f 100644 --- a/LibreHardwareMonitorLib/Hardware/Controller/Nzxt/KrakenX3.cs +++ b/LibreHardwareMonitorLib/Hardware/Controller/Nzxt/KrakenX3.cs @@ -104,7 +104,7 @@ namespace LibreHardwareMonitor.Hardware.Controller.Nzxt public override void Close() { base.Close(); - _stream.Close(); + _stream?.Close(); } private void ContinuousRead(object state) diff --git a/LibreHardwareMonitorLib/Hardware/SMBios.cs b/LibreHardwareMonitorLib/Hardware/SMBios.cs index 4ecc4cd..17a3807 100644 --- a/LibreHardwareMonitorLib/Hardware/SMBios.cs +++ b/LibreHardwareMonitorLib/Hardware/SMBios.cs @@ -530,7 +530,7 @@ namespace LibreHardwareMonitor.Hardware { int tmp = month; month = day; - day = month; + day = tmp; } return new DateTime(year < 100 ? 1900 + year : year, month, day); }