libicsneoc: Resolve DeviceCurrentlyClosed errors

This commit is contained in:
David Rebbe
2022-11-03 23:46:14 +00:00
parent 4c0d49f09a
commit 5ff1707c47
4 changed files with 10 additions and 3 deletions
+5
View File
@@ -196,6 +196,11 @@ VCP::VCP(const device_eventhandler_t& err, neodevice_t& forDevice) : Driver(err)
detail = std::make_shared<Detail>();
}
VCP::~VCP() {
if(isOpen())
close();
}
bool VCP::IsHandleValid(neodevice_handle_t handle) {
if(handle < 1)
return false;