Safeguards to prevent crash when closing the window in the exact moment the battery is updated.

This commit is contained in:
IceStormNG
2023-07-26 20:32:09 +02:00
parent a451125475
commit 54d7dfe4f8

View File

@@ -95,6 +95,10 @@ namespace GHelper
{
this.Invoke(delegate
{
if (Disposing || IsDisposed)
{
return;
}
VisualizeBatteryState();
});
@@ -312,6 +316,10 @@ namespace GHelper
//Mouse disconnected. Bye bye.
this.Invoke(delegate
{
if (Disposing || IsDisposed)
{
return;
}
this.Close();
});