mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Set pointer to nullptr after delete
This commit is contained in:
parent
bbc257199b
commit
6d0ca40aae
1 changed files with 1 additions and 0 deletions
|
@ -70,6 +70,7 @@ void DeviceTracker::destroyDevice(const Name& name) {
|
|||
DeviceTracker::ID deviceID = getDeviceID(name);
|
||||
if (deviceID != INVALID_DEVICE) {
|
||||
delete Singleton::get()->_devicesVector[getDeviceID(name)];
|
||||
Singleton::get()->_devicesVector[getDeviceID(name)] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue