Skip to content

Commit

Permalink
#300: fixed destroy when device is null
Browse files Browse the repository at this point in the history
  • Loading branch information
1kc committed Mar 15, 2021
1 parent a5f63c4 commit 23c56d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/razerdevicemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ export class RazerDeviceManager {
}

destroy() {
this.activeRazerDevices.forEach(device => device.destroy());
this.activeRazerDevices.forEach(device => {
if (device !== null) {
device.destroy();
}
});
this.closeDevices();
this.addon = null;
}
Expand Down

0 comments on commit 23c56d7

Please sign in to comment.