mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Safeguards to prevent crash when closing the window in the exact moment the battery is updated.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user