File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -437,7 +437,10 @@ Public Class WinNUT
437437 LogFile.LogTracing( "Init Disconnecting Before Close WinNut" , LogLvl.LOG_DEBUG, Me )
438438 RemoveHandler Microsoft.Win32.SystemEvents.PowerModeChanged, AddressOf SystemEvents_PowerModeChanged
439439 ' UPSDisconnect()
440- UPS_Device.Disconnect()
440+ If UPS_Device IsNot Nothing Then
441+ UPS_Device.Disconnect()
442+ End If
443+
441444 LogFile.LogTracing( "WinNut Is now Closed" , LogLvl.LOG_DEBUG, Me )
442445 End
443446 End If
@@ -554,8 +557,8 @@ Public Class WinNUT
554557 FormText &= WinNUT_Globals.StrLog.Item(AppResxStr.STR_MAIN_BATOK)
555558 End Select
556559 End Select
557- If NotifyStr.Length > 64 Then
558- NotifyStr = NotifyStr.Substring( 0 , ( 64 - NotifyStr.Length - 4 ) ) & "..."
560+ If NotifyStr.Length > 63 Then
561+ NotifyStr = NotifyStr.Substring( 0 , 60 ) & "..."
559562 End If
560563 NotifyIcon.Text = NotifyStr
561564 If Me .WindowState = System.Windows.Forms.FormWindowState.Minimized And NotifyIcon.Visible = False Then
You can’t perform that action at this time.
0 commit comments