fix: checking dongle pointer in hid.recon off

This commit is contained in:
evilsocket 2019-03-19 03:03:03 +01:00
commit 1cb5e82186
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -203,7 +203,9 @@ func (mod *HIDRecon) Configure() error {
func (mod *HIDRecon) Stop() error {
return mod.SetRunning(false, func() {
mod.waitGroup.Wait()
mod.dongle.Close()
mod.Debug("device closed")
if mod.dongle != nil {
mod.dongle.Close()
mod.Debug("device closed")
}
})
}