diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.vb b/WinNUT_V2/WinNUT-Client/WinNUT.vb index 11f3de6..bdd1e55 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.vb +++ b/WinNUT_V2/WinNUT-Client/WinNUT.vb @@ -641,8 +641,8 @@ Public Class WinNUT If .Batt_Charge = -1 AndAlso .Batt_Runtime = -1 Then LogFile.LogTracing("Battery properties unavailable, unable to validate shutdown conditions.", LogLvl.LOG_WARNING, Me) ElseIf Not ShutdownStatus Then - If .Batt_Charge <= My.Settings.PW_BattChrgFloor Or - .Batt_Runtime <= My.Settings.PW_RuntimeFloor Then + If (.Batt_Charge <> -1 AndAlso .Batt_Charge <= My.Settings.PW_BattChrgFloor) Or + (.Batt_Runtime <> -1 AndAlso .Batt_Runtime <= My.Settings.PW_RuntimeFloor) Then LogFile.LogTracing("UPS battery has dropped below stop condition limits.", LogLvl.LOG_NOTICE, Me, StrLog.Item(AppResxStr.STR_LOG_SHUT_START)) Shutdown_Event()