summaryrefslogtreecommitdiff
path: root/include/device.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-10-24 17:40:50 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-11-26 18:56:24 +0100
commit8f70b382067c932232dbf3966d8859266986004d (patch)
tree2bf3ee2df9b66ae66961a7517d0f9a27f4d6428d /include/device.h
parent29974c0d51f099af9869e49597f77936fc069376 (diff)
downloadlibnitrokey-8f70b382067c932232dbf3966d8859266986004d.tar.gz
libnitrokey-8f70b382067c932232dbf3966d8859266986004d.tar.bz2
Try to disconnect when destroying device
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/device.h')
-rw-r--r--include/device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/device.h b/include/device.h
index 34b7a5b..3f18921 100644
--- a/include/device.h
+++ b/include/device.h
@@ -21,6 +21,7 @@ class Device {
public:
Device();
+ virtual ~Device(){disconnect();}
// lack of device is not actually an error,
// so it doesn't throw