WMI/WmiProvider.cs
changeset 390 88d699a65cc2
parent 344 3145aadca3d2
     1.1 --- a/WMI/WmiProvider.cs	Sun Nov 04 13:10:53 2012 +0000
     1.2 +++ b/WMI/WmiProvider.cs	Mon Nov 19 21:05:41 2012 +0000
     1.3 @@ -5,7 +5,8 @@
     1.4    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.5   
     1.6    Copyright (C) 2009-2010 Paul Werelds <paul@werelds.net>
     1.7 -	
     1.8 +	Copyright (C) 2012 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.9 +
    1.10  */
    1.11  
    1.12  using System;
    1.13 @@ -102,6 +103,9 @@
    1.14          item => item.Identifier == identifier.ToString()
    1.15        );
    1.16  
    1.17 +      if (instanceIndex == -1)
    1.18 +        return;
    1.19 +
    1.20        try {
    1.21          Instrumentation.Revoke(activeInstances[instanceIndex]);
    1.22        } catch (Exception) { }