From 0aa52cfc6437c8750f7e38ee7a7a7f112de23082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Tue, 15 Mar 2011 22:00:31 +0000 Subject: [PATCH] Fixed Issue 161. --- Hardware/Heatmaster/Heatmaster.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hardware/Heatmaster/Heatmaster.cs b/Hardware/Heatmaster/Heatmaster.cs index 3656bce..13ba999 100644 --- a/Hardware/Heatmaster/Heatmaster.cs +++ b/Hardware/Heatmaster/Heatmaster.cs @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2010 + Portions created by the Initial Developer are Copyright (C) 2010-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -265,7 +265,7 @@ namespace OpenHardwareMonitor.Hardware.Heatmaster { if (!available) return; - while (serialPort.BytesToRead > 0) { + while (serialPort.IsOpen && serialPort.BytesToRead > 0) { byte b = (byte)serialPort.ReadByte(); if (b == 0x0D) { ProcessUpdateLine(buffer.ToString());