Fix bad removeDevice map check

This commit is contained in:
pixl 2020-07-19 23:48:24 -04:00
parent 6d7d91cc20
commit 78c0788be6
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E

View File

@ -102,7 +102,7 @@ void DeviceManager::removeDevice(std::string path)
logPrintf(INFO, "Receiver on %s disconnected", path.c_str()); logPrintf(INFO, "Receiver on %s disconnected", path.c_str());
} else { } else {
auto device = _devices.find(path); auto device = _devices.find(path);
if(device != _devices.find(path)) { if(device != _devices.end()) {
_devices.erase(device); _devices.erase(device);
logPrintf(INFO, "Device on %s disconnected", path.c_str()); logPrintf(INFO, "Device on %s disconnected", path.c_str());
} }