fixed a rare exception when lighting systems dispose

This commit is contained in:
Ell 2022-08-05 20:43:56 +02:00
parent f640d05fa5
commit 614facddaf
2 changed files with 10 additions and 2 deletions

View file

@ -20,7 +20,11 @@ namespace Illumilib.System {
public override void Dispose() {
base.Dispose();
this.ClearBitmap();
LogitechGsdk.LogiLedShutdown();
try {
LogitechGsdk.LogiLedShutdown();
} catch {
// ignored
}
}
public override void SetAllLighting(float r, float g, float b) {

View file

@ -22,7 +22,11 @@ namespace Illumilib.System {
public override void Dispose() {
base.Dispose();
this.chroma?.UninitializeAsync();
try {
this.chroma?.UninitializeAsync();
} catch {
// ignored
}
this.effectOutdated = true;
}