From acc414932733ef9f90fd104f3ab9a46b8e005a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Mon, 19 Nov 2012 21:05:41 +0000 Subject: [PATCH] Fixed Issue 415. --- Properties/AssemblyVersion.cs | 4 ++-- WMI/WmiProvider.cs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Properties/AssemblyVersion.cs b/Properties/AssemblyVersion.cs index 9a57bac..9bd3b02 100644 --- a/Properties/AssemblyVersion.cs +++ b/Properties/AssemblyVersion.cs @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.5.1.9")] -[assembly: AssemblyInformationalVersion("0.5.1.9 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.5.1.10")] +[assembly: AssemblyInformationalVersion("0.5.1.10 Alpha")] \ No newline at end of file diff --git a/WMI/WmiProvider.cs b/WMI/WmiProvider.cs index 6e78df8..8456d56 100644 --- a/WMI/WmiProvider.cs +++ b/WMI/WmiProvider.cs @@ -5,7 +5,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. Copyright (C) 2009-2010 Paul Werelds - + Copyright (C) 2012 Michael Möller + */ using System; @@ -102,6 +103,9 @@ namespace OpenHardwareMonitor.WMI { item => item.Identifier == identifier.ToString() ); + if (instanceIndex == -1) + return; + try { Instrumentation.Revoke(activeInstances[instanceIndex]); } catch (Exception) { }